Open
Bug 933577
Opened 12 years ago
Updated 3 years ago
Optimize DrawTargetSkia::MaskSurface
Categories
(Core :: Graphics, defect)
Tracking
()
NEW
People
(Reporter: gal, Unassigned)
References
Details
Attachments
(3 files)
4.07 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
2.62 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
4.33 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #933567 +++
mattwoodrow:
I think the best way to implement MaskSurface will be to use the secret features of drawBitmap().
drawBitmap normally draws the passed bitmap as a source, unless the bitmap is a8, in which case it will use the bitmap as a mask and use the SkPaint to decide the source.
Most of the time we should already have a8 bitmap as the mask surface, but we can call SkBitmap::extractAlpha() if we get some other sort of source.
Then the implementation should be more or less identical to FillRect() except passing mask, aOffset.x, aOffset.y instead of aRect.
Reporter | ||
Comment 1•12 years ago
|
||
Assignee: nobody → gal
Reporter | ||
Comment 2•12 years ago
|
||
Reporter | ||
Comment 3•12 years ago
|
||
Reporter | ||
Updated•12 years ago
|
Attachment #825723 -
Flags: review?(matt.woodrow)
Reporter | ||
Updated•12 years ago
|
Attachment #825724 -
Flags: review?(matt.woodrow)
Reporter | ||
Updated•12 years ago
|
Attachment #825725 -
Flags: review?(matt.woodrow)
Comment 4•12 years ago
|
||
Comment on attachment 825723 [details] [diff] [review]
Part 1: Factor out PaintSurface
Review of attachment 825723 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/2d/DrawTargetSkia.cpp
@@ +328,5 @@
>
> SkRect sourceBoundingRect = RectToSkRect(boundingSource);
> SkIRect sourceBoundingIRect = RectToSkIRect(boundingSource);
>
> + const SkBitmap& bitmap = static_cast<SourceSurfaceSkia*>(static_cast<SourceSurface*>(surface))->GetBitmap();
The inner static_cast should just be surface.get()
Attachment #825723 -
Flags: review?(matt.woodrow) → review+
Updated•12 years ago
|
Attachment #825724 -
Flags: review?(matt.woodrow) → review+
Comment 5•12 years ago
|
||
Comment on attachment 825725 [details] [diff] [review]
Part 3: Optimize MaskSurface
Review of attachment 825725 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, as long as it works!
Attachment #825725 -
Flags: review?(matt.woodrow) → review+
Comment 6•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: gal → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•