Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: src/effects/SkLayerRasterizer.cpp

Issue 1148793007: change SkDraw and all Blitters to use pixmap instead of bitmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/effects/SkLayerRasterizer.cpp
diff --git a/src/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp
index d3e112c3a4b836118be46258c5f3d1b9fb181ab3..247ee3d2db799410b0c971eab43dcd8823b91fce 100644
--- a/src/effects/SkLayerRasterizer.cpp
+++ b/src/effects/SkLayerRasterizer.cpp
@@ -116,7 +116,6 @@ bool SkLayerRasterizer::onRasterize(const SkPath& path, const SkMatrix& matrix,
}
if (SkMask::kJustComputeBounds_CreateMode != mode) {
- SkBitmap device;
SkRasterClip rectClip;
SkDraw draw;
SkMatrix translatedMatrix; // this translates us to our local pixels
@@ -128,9 +127,9 @@ bool SkLayerRasterizer::onRasterize(const SkPath& path, const SkMatrix& matrix,
translatedMatrix.postTranslate(-SkIntToScalar(mask->fBounds.fLeft),
-SkIntToScalar(mask->fBounds.fTop));
- device.installMaskPixels(*mask);
-
- draw.fBitmap = &device;
+ if (!draw.fDst.reset(*mask)) {
scroggo 2015/06/08 15:21:38 Again, it seems like we could move this error exit
reed1 2015/06/08 17:11:01 Done.
+ return false;
+ }
draw.fMatrix = &drawMatrix;
draw.fRC = &rectClip;
draw.fClip = &rectClip.bwRgn();

Powered by Google App Engine
This is Rietveld 408576698