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

Unified Diff: src/core/SkBitmapDevice.cpp

Issue 1067893002: SkCanvas::resetForNextPicture() (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Return null when we're not recording. Should fix printing failures. Created 5 years, 8 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 | « include/core/SkPictureRecorder.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapDevice.cpp
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index 5fae2b58625493a6191df64d6a45824ff058e79e..5b2fc38e321cc48f6e6aff68f822e92fd8bcf727 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -103,6 +103,11 @@ SkImageInfo SkBitmapDevice::imageInfo() const {
return fBitmap.info();
}
+void SkBitmapDevice::setNewSize(const SkISize& size) {
+ SkASSERT(!fBitmap.pixelRef());
+ fBitmap.setInfo(fBitmap.info().makeWH(size.fWidth, size.fHeight));
+}
+
void SkBitmapDevice::replaceBitmapBackendForRasterSurface(const SkBitmap& bm) {
SkASSERT(bm.width() == fBitmap.width());
SkASSERT(bm.height() == fBitmap.height());
« no previous file with comments | « include/core/SkPictureRecorder.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698