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

Unified Diff: tools/CopyTilesRenderer.cpp

Issue 355193006: stop calling SkCanvas::getDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guard gpu code in no-gpu build Created 6 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 | « tests/WritePixelsTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/CopyTilesRenderer.cpp
diff --git a/tools/CopyTilesRenderer.cpp b/tools/CopyTilesRenderer.cpp
index ebd33d88511b3682330026dba49dac1faa5c8177..b5534f03a7a8697ee0e32b3d91605e3cb8bbf253 100644
--- a/tools/CopyTilesRenderer.cpp
+++ b/tools/CopyTilesRenderer.cpp
@@ -57,7 +57,8 @@ namespace sk_tools {
// Draw the picture
fCanvas->drawPicture(fPicture);
// Now extract the picture into tiles
- const SkBitmap& baseBitmap = fCanvas->getDevice()->accessBitmap(false);
+ SkBitmap baseBitmap;
+ fCanvas->readPixels(SkIRect::MakeSize(fCanvas->getBaseLayerSize()), &baseBitmap);
SkIRect subset;
for (int tileY = 0; tileY < fLargeTileHeight; tileY += this->getTileHeight()) {
for (int tileX = 0; tileX < fLargeTileWidth; tileX += this->getTileWidth()) {
« no previous file with comments | « tests/WritePixelsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698