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

Unified Diff: src/gpu/GrDrawState.h

Issue 504203004: Attach GrOptDrawState into shader building pipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@opt2
Patch Set: Remove BlendOpt Cache Created 6 years, 3 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: src/gpu/GrDrawState.h
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 4850fc911c8dc35e1c9172172055cf8c33242d76..21ce35fc8e27fccc269a2663867a390c9ebe2eb1 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -9,11 +9,12 @@
#define GrDrawState_DEFINED
#include "GrBlend.h"
-#include "GrOptDrawState.h"
#include "GrProgramResource.h"
#include "GrRODrawState.h"
#include "effects/GrSimpleTextureEffect.h"
+class GrOptDrawState;
+
/**
* Modifiable subclass derived from GrRODrawState. The majority of the data that represents a draw
* state is stored in the parent class. GrDrawState contains methods for setting, adding to, etc.
@@ -47,10 +48,7 @@ public:
**/
GrDrawState(const GrDrawState& state, const SkMatrix& preConcatMatrix);
- virtual ~GrDrawState() {
- SkSafeUnref(fCachedOptState);
- SkASSERT(0 == fBlockEffectRemovalCnt);
- }
+ virtual ~GrDrawState();
/**
* Resets to the default state. GrEffects will be removed from all stages.
@@ -549,17 +547,10 @@ public:
GrOptDrawState* createOptState() const;
private:
- void invalidateOptState() const {
- SkSafeSetNull(fCachedOptState);
- fBlendOptFlags = kInvalid_BlendOptFlag;
- }
+ void invalidateOptState() const;
void onReset(const SkMatrix* initialViewMatrix);
- void invalidateBlendOptFlags() {
- fBlendOptFlags = kInvalid_BlendOptFlag;
- }
-
// Some of the auto restore objects assume that no effects are removed during their lifetime.
// This is used to assert that this condition holds.
SkDEBUGCODE(int fBlockEffectRemovalCnt;)
« no previous file with comments | « include/gpu/GrEffectStage.h ('k') | src/gpu/GrDrawState.cpp » ('j') | src/gpu/GrOptDrawState.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698