OLD | NEW |
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 GrRODrawState_DEFINED | 8 #ifndef GrRODrawState_DEFINED |
9 #define GrRODrawState_DEFINED | 9 #define GrRODrawState_DEFINED |
10 | 10 |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 * pending reads and writes. This should be called when a GrDrawState is rec
orded into | 352 * pending reads and writes. This should be called when a GrDrawState is rec
orded into |
353 * a GrDrawTarget for later execution. Subclasses of GrRODrawState may add s
etters. However, | 353 * a GrDrawTarget for later execution. Subclasses of GrRODrawState may add s
etters. However, |
354 * once this call has been made the GrRODrawState is immutable. It is also n
o longer copyable. | 354 * once this call has been made the GrRODrawState is immutable. It is also n
o longer copyable. |
355 * In the future this conversion will automatically happen when converting a
GrDrawState into | 355 * In the future this conversion will automatically happen when converting a
GrDrawState into |
356 * an optimized draw state. | 356 * an optimized draw state. |
357 */ | 357 */ |
358 void convertToPendingExec(); | 358 void convertToPendingExec(); |
359 | 359 |
360 friend class GrDrawTarget; | 360 friend class GrDrawTarget; |
361 | 361 |
362 protected: | |
363 bool isEqual(const GrRODrawState& that) const; | 362 bool isEqual(const GrRODrawState& that) const; |
364 | 363 |
365 // These fields are roughly sorted by decreasing likelihood of being differe
nt in op== | 364 // These fields are roughly sorted by decreasing likelihood of being differe
nt in op== |
366 GrProgramResource fRenderTarget; | 365 GrProgramResource fRenderTarget; |
367 GrColor fColor; | 366 GrColor fColor; |
368 SkMatrix fViewMatrix; | 367 SkMatrix fViewMatrix; |
369 GrColor fBlendConstant; | 368 GrColor fBlendConstant; |
370 uint32_t fFlagBits; | 369 uint32_t fFlagBits; |
371 const GrVertexAttrib* fVAPtr; | 370 const GrVertexAttrib* fVAPtr; |
372 int fVACount; | 371 int fVACount; |
(...skipping 17 matching lines...) Expand all Loading... |
390 // not need to be compared in op==. | 389 // not need to be compared in op==. |
391 int fFixedFunctionVertexAttribIndices[kGrFixedFunctionVertexAttribBindingCnt
]; | 390 int fFixedFunctionVertexAttribIndices[kGrFixedFunctionVertexAttribBindingCnt
]; |
392 | 391 |
393 private: | 392 private: |
394 typedef SkRefCnt INHERITED; | 393 typedef SkRefCnt INHERITED; |
395 }; | 394 }; |
396 | 395 |
397 GR_MAKE_BITFIELD_OPS(GrRODrawState::BlendOptFlags); | 396 GR_MAKE_BITFIELD_OPS(GrRODrawState::BlendOptFlags); |
398 | 397 |
399 #endif | 398 #endif |
OLD | NEW |