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

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

Issue 701123003: Remove cached OptDrawState from GrDrawState. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comment 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrOptDrawState.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 "GrProcessorStage.h" 13 #include "GrProcessorStage.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 : public SkRefCnt {
28 public: 28 public:
29 /** 29 /**
30 * Returns a snapshot of the current optimized state. If the current drawSta te has a valid 30 * Returns a snapshot of the current optimized state. The GrOptDrawState is reffed and ownership
31 * cached optimiezed state it will simply return a pointer to it otherwise i t will create a new 31 * is given to the caller.
32 * GrOptDrawState. In all cases the GrOptDrawState is reffed and ownership i s given to the
33 * caller.
34 */ 32 */
35 static GrOptDrawState* Create(const GrDrawState& drawState, GrGpu*, 33 static GrOptDrawState* Create(const GrDrawState& drawState, GrGpu*,
36 const GrDeviceCoordTexture* dstCopy, GrGpu::Dr awType drawType); 34 const GrDeviceCoordTexture* dstCopy, GrGpu::Dr awType drawType);
37 35
38 bool operator== (const GrOptDrawState& that) const; 36 bool operator== (const GrOptDrawState& that) const;
39 37
40 /////////////////////////////////////////////////////////////////////////// 38 ///////////////////////////////////////////////////////////////////////////
41 /// @name Vertex Attributes 39 /// @name Vertex Attributes
42 //// 40 ////
43 41
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 389
392 GrProgramDesc fDesc; 390 GrProgramDesc fDesc;
393 391
394 typedef SkRefCnt INHERITED; 392 typedef SkRefCnt INHERITED;
395 }; 393 };
396 394
397 GR_MAKE_BITFIELD_OPS(GrOptDrawState::BlendOptFlags); 395 GR_MAKE_BITFIELD_OPS(GrOptDrawState::BlendOptFlags);
398 396
399 #endif 397 #endif
400 398
OLDNEW
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698