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

Unified Diff: src/image/SkSurface.cpp

Issue 926843003: Move canvas->surface association to the device subclasses (Closed) Base URL: https://skia.googlesource.com/skia.git@skimage-filters-03-sksurface-set-root-device-simple
Patch Set: Created 5 years, 10 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/gpu/SkGpuDevice.cpp ('k') | src/image/SkSurface_Base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface.cpp
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp
index 2d3fa2bf7a4eeee1e0d46943c40d45e8d73ee2b7..512a51865d36b66350192a14a09586251cdd254e 100644
--- a/src/image/SkSurface.cpp
+++ b/src/image/SkSurface.cpp
@@ -69,11 +69,6 @@ SkSurface_Base::SkSurface_Base(const SkImageInfo& info, const SkSurfaceProps* pr
}
SkSurface_Base::~SkSurface_Base() {
- // in case the canvas outsurvives us, we null the callback
- if (fCachedCanvas) {
- fCachedCanvas->setSurfaceBase(NULL);
- }
-
SkSafeUnref(fCachedImage);
SkSafeUnref(fCachedCanvas);
}
@@ -89,8 +84,6 @@ void SkSurface_Base::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPa
void SkSurface_Base::aboutToDraw(ContentChangeMode mode) {
this->dirtyGenerationID();
- SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this);
-
if (fCachedImage) {
// the surface may need to fork its backend, if its sharing it with
// the cached image. Note: we only call if there is an outstanding owner
@@ -109,7 +102,6 @@ void SkSurface_Base::aboutToDraw(ContentChangeMode mode) {
}
uint32_t SkSurface_Base::newGenerationID() {
- SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this);
static int32_t gID;
return sk_atomic_inc(&gID) + 1;
}
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/image/SkSurface_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698