Closed
Bug 902651
Opened 11 years ago
Closed 11 years ago
CanvasRenderingContext2D::Demote should preserve DrawTarget state
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: roc, Assigned: snorp)
Details
Attachments
(1 file, 2 obsolete files)
8.73 KB,
patch
|
mattwoodrow
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
The DrawTarget's transform and clip need to be copied to the new DrawTarget.
Reporter | ||
Comment 1•11 years ago
|
||
An interesting case is when we push a few clips, Demote(), then pop a clip or two.
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #1) > An interesting case is when we push a few clips, Demote(), then pop a clip > or two. I kinda wonder if we should add a mozDemote() method or something so we can explicitly demote in order to test this thing.
Assignee | ||
Comment 3•11 years ago
|
||
This also includes a mochitest and some machinery for demoting canvases from there
Attachment #793111 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 4•11 years ago
|
||
I don't really like the event hack. I think I'm going to add a method to CanvasRenderingContext2D.idl instead.
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #793222 -
Flags: review?(matt.woodrow)
Assignee | ||
Updated•11 years ago
|
Attachment #793111 -
Attachment is obsolete: true
Attachment #793111 -
Flags: review?(matt.woodrow)
Comment 6•11 years ago
|
||
Comment on attachment 793222 [details] [diff] [review] better patch Review of attachment 793222 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, please find someone else to review the .webidl change though. We still the actual copying of state patch too, right?
Attachment #793222 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #793222 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 7•11 years ago
|
||
Indeed I forgot the part to actually restore the clip/transform was in a different patch. Fixed.
Attachment #793222 -
Attachment is obsolete: true
Attachment #793222 -
Flags: review?(bzbarsky)
Attachment #793489 -
Flags: review?(matt.woodrow)
Attachment #793489 -
Flags: review?(bzbarsky)
Comment 8•11 years ago
|
||
Comment on attachment 793489 [details] [diff] [review] Restore the DrawTarget transform and clip when demoting >+#if USE_SKIA_GPU ifdef, right? r=me on the binding part, assuming that was what you wanted me to review. If it wasn't, please say what you _did_ want me to review.
Attachment #793489 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #8) > Comment on attachment 793489 [details] [diff] [review] > Restore the DrawTarget transform and clip when demoting > > >+#if USE_SKIA_GPU > > ifdef, right? Yup, good catch. > > r=me on the binding part, assuming that was what you wanted me to review. > If it wasn't, please say what you _did_ want me to review. Yes, that was the bit I wanted you to review. Thanks!
Comment 10•11 years ago
|
||
Comment on attachment 793489 [details] [diff] [review] Restore the DrawTarget transform and clip when demoting Review of attachment 793489 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/canvas/src/CanvasRenderingContext2D.h @@ +567,5 @@ > > return CurrentState().font; > } > > #if USE_SKIA_GPU #ifdef here too
Attachment #793489 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 11•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d76df67ac3b1
Assignee | ||
Comment 12•11 years ago
|
||
(I fixed up all the s/if/ifdef/ stuff, thanks)
Comment 13•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d76df67ac3b1
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•