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

Unified Diff: include/gpu/GrContext.h

Issue 947443003: Move clip off of draw target (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/SkRect.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 846cd0f1118fa492da7633d8fec5b84d68b87568..2433b89189d60fc43e84e6dae4f893b143fa7e3b 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -8,7 +8,7 @@
#ifndef GrContext_DEFINED
#define GrContext_DEFINED
-#include "GrClipData.h"
+#include "GrClip.h"
#include "GrColor.h"
#include "GrPaint.h"
#include "GrPathRendererChain.h"
@@ -367,13 +367,13 @@ public:
* Gets the current clip.
* @return the current clip.
*/
- const GrClipData* getClip() const { return fClip; }
+ const GrClip* getClip() const { return fClip; }
/**
* Sets the clip.
* @param clipData the clip to set.
*/
- void setClip(const GrClipData* clipData) { fClip = clipData; }
+ void setClip(const GrClip* clipData) { fClip = clipData; }
///////////////////////////////////////////////////////////////////////////
// Draws
@@ -680,7 +680,7 @@ public:
AutoClip(GrContext* context, InitialClip SkDEBUGCODE(initialState))
: fContext(context) {
SkASSERT(kWideOpen_InitialClip == initialState);
- fNewClipData.fClipStack.reset(SkRef(&fNewClipStack));
+ fNewClipData.setClipStack(&fNewClipStack);
fOldClip = context->getClip();
context->setClip(&fNewClipData);
@@ -689,7 +689,7 @@ public:
AutoClip(GrContext* context, const SkRect& newClipRect)
: fContext(context)
, fNewClipStack(newClipRect) {
- fNewClipData.fClipStack.reset(SkRef(&fNewClipStack));
+ fNewClipData.setClipStack(&fNewClipStack);
fOldClip = fContext->getClip();
fContext->setClip(&fNewClipData);
@@ -702,10 +702,10 @@ public:
}
private:
GrContext* fContext;
- const GrClipData* fOldClip;
+ const GrClip* fOldClip;
SkClipStack fNewClipStack;
- GrClipData fNewClipData;
+ GrClip fNewClipData;
};
class AutoWideOpenIdentityDraw {
@@ -761,7 +761,7 @@ public:
private:
GrGpu* fGpu;
- const GrClipData* fClip; // TODO: make this ref counted
+ const GrClip* fClip;
GrResourceCache* fResourceCache;
GrFontCache* fFontCache;
« no previous file with comments | « include/gpu/GrClipData.h ('k') | src/core/SkRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698