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

Unified Diff: src/effects/SkLayerRasterizer.cpp

Issue 1168303006: Revert[2] SkDraw and all Blitters to use pixmap instead of bitmapi (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add dox to new test 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
« no previous file with comments | « src/core/SkScan_Path.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLayerRasterizer.cpp
diff --git a/src/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp
index d3e112c3a4b836118be46258c5f3d1b9fb181ab3..8403d06147a602969aeb8c5f5d1af00a3fe062f5 100644
--- a/src/effects/SkLayerRasterizer.cpp
+++ b/src/effects/SkLayerRasterizer.cpp
@@ -116,9 +116,12 @@ bool SkLayerRasterizer::onRasterize(const SkPath& path, const SkMatrix& matrix,
}
if (SkMask::kJustComputeBounds_CreateMode != mode) {
- SkBitmap device;
- SkRasterClip rectClip;
SkDraw draw;
+ if (!draw.fDst.reset(*mask)) {
+ return false;
+ }
+
+ SkRasterClip rectClip;
SkMatrix translatedMatrix; // this translates us to our local pixels
SkMatrix drawMatrix; // this translates the path by each layer's offset
@@ -128,9 +131,6 @@ 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;
draw.fMatrix = &drawMatrix;
draw.fRC = &rectClip;
draw.fClip = &rectClip.bwRgn();
« no previous file with comments | « src/core/SkScan_Path.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698