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

Unified Diff: include/gpu/GrContext.h

Issue 894693003: Add refcnting to SkClipStack on SkCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc 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 | « include/gpu/GrClipData.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index d8d061a19efc87f8e52e3639462790eaec68c242..bbba977d70dedbf0052d66b7f9c101e97e7d2b0e 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -700,7 +700,7 @@ public:
AutoClip(GrContext* context, InitialClip SkDEBUGCODE(initialState))
: fContext(context) {
SkASSERT(kWideOpen_InitialClip == initialState);
- fNewClipData.fClipStack = &fNewClipStack;
+ fNewClipData.fClipStack.reset(SkRef(&fNewClipStack));
fOldClip = context->getClip();
context->setClip(&fNewClipData);
@@ -709,7 +709,7 @@ public:
AutoClip(GrContext* context, const SkRect& newClipRect)
: fContext(context)
, fNewClipStack(newClipRect) {
- fNewClipData.fClipStack = &fNewClipStack;
+ fNewClipData.fClipStack.reset(SkRef(&fNewClipStack));
fOldClip = fContext->getClip();
fContext->setClip(&fNewClipData);
« no previous file with comments | « include/gpu/GrClipData.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698