Closed
Bug 902651
Opened 12 years ago
Closed 12 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•12 years ago
|
||
An interesting case is when we push a few clips, Demote(), then pop a clip or two.
| Assignee | ||
Comment 2•12 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•12 years ago
|
||
This also includes a mochitest and some machinery for demoting canvases from there
Attachment #793111 -
Flags: review?(matt.woodrow)
| Assignee | ||
Comment 4•12 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•12 years ago
|
||
Attachment #793222 -
Flags: review?(matt.woodrow)
| Assignee | ||
Updated•12 years ago
|
Attachment #793111 -
Attachment is obsolete: true
Attachment #793111 -
Flags: review?(matt.woodrow)
Comment 6•12 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•12 years ago
|
Attachment #793222 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 7•12 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•12 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•12 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•12 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•12 years ago
|
||
| Assignee | ||
Comment 12•12 years ago
|
||
(I fixed up all the s/if/ifdef/ stuff, thanks)
Comment 13•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•