| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrDrawState_DEFINED | 8 #ifndef GrDrawState_DEFINED |
| 9 #define GrDrawState_DEFINED | 9 #define GrDrawState_DEFINED |
| 10 | 10 |
| 11 #include "GrBlend.h" | 11 #include "GrBlend.h" |
| 12 #include "GrProgramResource.h" | 12 #include "GrGpuResourceRef.h" |
| 13 #include "GrRODrawState.h" | 13 #include "GrRODrawState.h" |
| 14 #include "effects/GrSimpleTextureEffect.h" | 14 #include "effects/GrSimpleTextureEffect.h" |
| 15 | 15 |
| 16 class GrOptDrawState; | 16 class GrOptDrawState; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Modifiable subclass derived from GrRODrawState. The majority of the data that
represents a draw | 19 * Modifiable subclass derived from GrRODrawState. The majority of the data that
represents a draw |
| 20 * state is stored in the parent class. GrDrawState contains methods for setting
, adding to, etc. | 20 * state is stored in the parent class. GrDrawState contains methods for setting
, adding to, etc. |
| 21 * various data members of the draw state. This class is used to configure the s
tate used when | 21 * various data members of the draw state. This class is used to configure the s
tate used when |
| 22 * issuing draws via GrDrawTarget. | 22 * issuing draws via GrDrawTarget. |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 /////////////////////////////////////////////////////////////////////////// | 398 /////////////////////////////////////////////////////////////////////////// |
| 399 /// @name Render Target | 399 /// @name Render Target |
| 400 //// | 400 //// |
| 401 | 401 |
| 402 /** | 402 /** |
| 403 * Sets the render-target used at the next drawing call | 403 * Sets the render-target used at the next drawing call |
| 404 * | 404 * |
| 405 * @param target The render target to set. | 405 * @param target The render target to set. |
| 406 */ | 406 */ |
| 407 void setRenderTarget(GrRenderTarget* target) { | 407 void setRenderTarget(GrRenderTarget* target) { |
| 408 fRenderTarget.set(SkSafeRef(target), GrProgramResource::kWrite_IOType); | 408 fRenderTarget.set(SkSafeRef(target), GrGpuResourceRef::kWrite_IOType); |
| 409 this->invalidateOptState(); | 409 this->invalidateOptState(); |
| 410 } | 410 } |
| 411 | 411 |
| 412 /// @} | 412 /// @} |
| 413 | 413 |
| 414 /////////////////////////////////////////////////////////////////////////// | 414 /////////////////////////////////////////////////////////////////////////// |
| 415 /// @name Stencil | 415 /// @name Stencil |
| 416 //// | 416 //// |
| 417 | 417 |
| 418 /** | 418 /** |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 SkDEBUGCODE(int fBlockEffectRemovalCnt;) | 559 SkDEBUGCODE(int fBlockEffectRemovalCnt;) |
| 560 | 560 |
| 561 void internalSetVertexAttribs(const GrVertexAttrib attribs[], int count, siz
e_t stride); | 561 void internalSetVertexAttribs(const GrVertexAttrib attribs[], int count, siz
e_t stride); |
| 562 | 562 |
| 563 mutable GrOptDrawState* fCachedOptState; | 563 mutable GrOptDrawState* fCachedOptState; |
| 564 | 564 |
| 565 typedef GrRODrawState INHERITED; | 565 typedef GrRODrawState INHERITED; |
| 566 }; | 566 }; |
| 567 | 567 |
| 568 #endif | 568 #endif |
| OLD | NEW |