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

Unified Diff: src/core/SkCanvas.cpp

Issue 1117213003: clean up pre-storage in canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/SkCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index c87c6c5f7c1bfa1a6cfee06c5b93d82a6ab63cae..80e913d9f9913e0b3973c2214a356ca0527c4630 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -530,9 +530,9 @@ SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) {
fMCRec = (MCRec*)fMCStack.push_back();
new (fMCRec) MCRec(fConservativeRasterClip);
- SkASSERT(sizeof(DeviceCM) <= sizeof(fBaseLayerStorage));
- fMCRec->fLayer = (DeviceCM*)fBaseLayerStorage;
- new (fBaseLayerStorage) DeviceCM(NULL, NULL, NULL, fConservativeRasterClip, false);
+ SkASSERT(sizeof(DeviceCM) <= sizeof(fDeviceCMStorage));
+ fMCRec->fLayer = (DeviceCM*)fDeviceCMStorage;
+ new (fDeviceCMStorage) DeviceCM(NULL, NULL, NULL, fConservativeRasterClip, false);
fMCRec->fTopLayer = fMCRec->fLayer;
@@ -1106,7 +1106,7 @@ void SkCanvas::internalRestore() {
SkDELETE(layer);
} else {
// we're at the root
- SkASSERT(layer == (void*)fBaseLayerStorage);
+ SkASSERT(layer == (void*)fDeviceCMStorage);
layer->~DeviceCM();
}
}
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698