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

Side by Side Diff: src/gpu/GrOptDrawState.h

Issue 746243002: Create GrOptDrawState directly in the cmd buffer in GrIODB. (Closed) Base URL: https://skia.googlesource.com/skia.git@recorder
Patch Set: Address comments Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrOptDrawState_DEFINED 8 #ifndef GrOptDrawState_DEFINED
9 #define GrOptDrawState_DEFINED 9 #define GrOptDrawState_DEFINED
10 10
11 #include "GrColor.h" 11 #include "GrColor.h"
12 #include "GrGpu.h" 12 #include "GrGpu.h"
13 #include "GrPendingFragmentStage.h" 13 #include "GrPendingFragmentStage.h"
14 #include "GrProgramDesc.h" 14 #include "GrProgramDesc.h"
15 #include "GrStencil.h" 15 #include "GrStencil.h"
16 #include "GrTypesPriv.h" 16 #include "GrTypesPriv.h"
17 #include "SkMatrix.h" 17 #include "SkMatrix.h"
18 #include "SkRefCnt.h" 18 #include "SkRefCnt.h"
19 19
20 class GrDeviceCoordTexture; 20 class GrDeviceCoordTexture;
21 class GrDrawState; 21 class GrDrawState;
22 22
23 /** 23 /**
24 * Class that holds an optimized version of a GrDrawState. It is meant to be an immutable class, 24 * Class that holds an optimized version of a GrDrawState. It is meant to be an immutable class,
25 * and contains all data needed to set the state for a gpu draw. 25 * and contains all data needed to set the state for a gpu draw.
26 */ 26 */
27 class GrOptDrawState : public SkRefCnt { 27 class GrOptDrawState {
28 public: 28 public:
29 SK_DECLARE_INST_COUNT(GrOptDrawState) 29 SK_DECLARE_INST_COUNT(GrOptDrawState)
30 30
31 typedef GrClipMaskManager::ScissorState ScissorState; 31 typedef GrClipMaskManager::ScissorState ScissorState;
32 32
33 GrOptDrawState(const GrDrawState& drawState, GrGpu*, const ScissorState&, 33 GrOptDrawState(const GrDrawState& drawState, GrGpu*, const ScissorState&,
34 const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType); 34 const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType);
35 35
36 bool operator== (const GrOptDrawState& that) const; 36 bool operator== (const GrOptDrawState& that) const;
37 bool operator!= (const GrOptDrawState& that) const { return !(*this == that) ; } 37 bool operator!= (const GrOptDrawState& that) const { return !(*this == that) ; }
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 int fNumColorStages; 273 int fNumColorStages;
274 274
275 SkAutoSTArray<4, GrVertexAttrib> fOptVA; 275 SkAutoSTArray<4, GrVertexAttrib> fOptVA;
276 276
277 GrProgramDesc fDesc; 277 GrProgramDesc fDesc;
278 278
279 typedef SkRefCnt INHERITED; 279 typedef SkRefCnt INHERITED;
280 }; 280 };
281 281
282 #endif 282 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698