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

Unified Diff: src/gpu/GrOptDrawState.h

Issue 742763002: scissor state on optstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 1 month 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 | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOptDrawState.h
diff --git a/src/gpu/GrOptDrawState.h b/src/gpu/GrOptDrawState.h
index ab531eed5eb7ebcb70020d263d2512d4ec70d472..903b227891ef18d65209e1c4337c4a44a7b3f78e 100644
--- a/src/gpu/GrOptDrawState.h
+++ b/src/gpu/GrOptDrawState.h
@@ -28,12 +28,15 @@ class GrOptDrawState : public SkRefCnt {
public:
SK_DECLARE_INST_COUNT(GrOptDrawState)
+ typedef GrClipMaskManager::ScissorState ScissorState;
+
/**
* Returns a snapshot of the current optimized state. The GrOptDrawState is reffed and ownership
* is given to the caller.
*/
static GrOptDrawState* Create(const GrDrawState& drawState,
GrGpu*,
+ const ScissorState&,
const GrDeviceCoordTexture* dstCopy,
GrGpu::DrawType drawType);
@@ -164,6 +167,15 @@ public:
/// @}
///////////////////////////////////////////////////////////////////////////
+ /// @name ScissorState
+ ////
+
+ const ScissorState& getScissorState() const { return fScissorState; }
+
+ /// @}
+
+
+ ///////////////////////////////////////////////////////////////////////////
/// @name State Flags
////
@@ -268,7 +280,8 @@ private:
*/
GrOptDrawState(const GrDrawState& drawState, BlendOptFlags blendOptFlags,
GrBlendCoeff optSrcCoeff, GrBlendCoeff optDstCoeff,
- GrGpu*, const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType);
+ GrGpu*, const ScissorState&, const GrDeviceCoordTexture* dstCopy,
+ GrGpu::DrawType);
/**
* Loops through all the color stage effects to check if the stage will ignore color input or
@@ -321,6 +334,7 @@ private:
typedef SkSTArray<8, GrPendingFragmentStage> FragmentStageArray;
typedef GrPendingProgramElement<const GrGeometryProcessor> ProgramGeometryProcessor;
RenderTarget fRenderTarget;
+ ScissorState fScissorState;
GrColor fColor;
SkMatrix fViewMatrix;
GrColor fBlendConstant;
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698