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

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: more cleanup 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
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index e47ad15519f34a15b753062ebc9b25a1a6ea4529..cf147502770dc341a8adf8f33d973ae331dc7b99 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -695,7 +695,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);
@@ -704,7 +704,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);

Powered by Google App Engine
This is Rietveld 408576698