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

Unified Diff: src/utils/SkDeferredCanvas.cpp

Issue 933043006: Implement SkBaseDevice snapshot support Base URL: https://skia.googlesource.com/skia.git@skimage-filters-04-snapshot-devices
Patch Set: Created 5 years, 9 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/image/SkSurface_Raster.cpp ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkDeferredCanvas.cpp
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index faf1cf974a0c8682941b6e20259212976e23b75d..1e955b378239a421c1e1968529e518bd9170e415 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -259,7 +259,7 @@ protected:
private:
void flush() SK_OVERRIDE;
- void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRIDE {}
+ void replaceBitmapBackend(const SkBitmap&) SK_OVERRIDE {}
void beginRecording();
void init();
@@ -353,9 +353,7 @@ void SkDeferredDevice::aboutToDraw()
fNotificationClient->prepareForDraw();
}
if (fCanDiscardCanvasContents) {
- if (fSurface) {
- fSurface->notifyContentWillChange(SkSurface::kDiscard_ContentChangeMode);
- }
+ fImmediateCanvas->discard();
fCanDiscardCanvasContents = false;
}
}
@@ -444,11 +442,7 @@ void SkDeferredDevice::prepareForImmediatePixelWrite() {
if (fPipeController.hasPendingCommands()) {
this->flushPendingCommands(kNormal_PlaybackMode);
} else {
- bool mustNotifyDirectly = !fCanDiscardCanvasContents;
this->aboutToDraw();
- if (mustNotifyDirectly) {
- fSurface->notifyContentWillChange(SkSurface::kRetain_ContentChangeMode);
- }
}
fImmediateCanvas->flush();
« no previous file with comments | « src/image/SkSurface_Raster.cpp ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698