| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef GrGpu_DEFINED | 10 #ifndef GrGpu_DEFINED |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // This timestamp can be used to lazily detect when cached 3D context state | 292 // This timestamp can be used to lazily detect when cached 3D context state |
| 293 // is dirty. | 293 // is dirty. |
| 294 ResetTimestamp getResetTimestamp() const { | 294 ResetTimestamp getResetTimestamp() const { |
| 295 return fResetTimestamp; | 295 return fResetTimestamp; |
| 296 } | 296 } |
| 297 | 297 |
| 298 /** | 298 /** |
| 299 * Can the provided configuration act as a color render target? | 299 * Can the provided configuration act as a color render target? |
| 300 */ | 300 */ |
| 301 bool isConfigRenderable(GrPixelConfig config) const { | 301 bool isConfigRenderable(GrPixelConfig config) const { |
| 302 GrAssert(kGrPixelConfigCount > config); | 302 GrAssert(kGrPixelConfigCnt > config); |
| 303 return fConfigRenderSupport[config]; | 303 return fConfigRenderSupport[config]; |
| 304 } | 304 } |
| 305 | 305 |
| 306 /** | 306 /** |
| 307 * These methods are called by the clip manager's setupClipping function | 307 * These methods are called by the clip manager's setupClipping function |
| 308 * which (called as part of GrGpu's implementation of onDraw and | 308 * which (called as part of GrGpu's implementation of onDraw and |
| 309 * onStencilPath member functions.) The GrGpu subclass should flush the | 309 * onStencilPath member functions.) The GrGpu subclass should flush the |
| 310 * stencil state to the 3D API in its implementation of flushGraphicsState. | 310 * stencil state to the 3D API in its implementation of flushGraphicsState. |
| 311 */ | 311 */ |
| 312 void enableScissor(const GrIRect& rect) { | 312 void enableScissor(const GrIRect& rect) { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 struct ScissorState { | 396 struct ScissorState { |
| 397 bool fEnabled; | 397 bool fEnabled; |
| 398 GrIRect fRect; | 398 GrIRect fRect; |
| 399 } fScissorState; | 399 } fScissorState; |
| 400 | 400 |
| 401 // The final stencil settings to use as determined by the clip manager. | 401 // The final stencil settings to use as determined by the clip manager. |
| 402 GrStencilSettings fStencilSettings; | 402 GrStencilSettings fStencilSettings; |
| 403 | 403 |
| 404 // Derived classes need access to this so they can fill it out in their | 404 // Derived classes need access to this so they can fill it out in their |
| 405 // constructors | 405 // constructors |
| 406 bool fConfigRenderSupport[kGrPixelConfigCount]; | 406 bool fConfigRenderSupport[kGrPixelConfigCnt]; |
| 407 | 407 |
| 408 // Helpers for setting up geometry state | 408 // Helpers for setting up geometry state |
| 409 void finalizeReservedVertices(); | 409 void finalizeReservedVertices(); |
| 410 void finalizeReservedIndices(); | 410 void finalizeReservedIndices(); |
| 411 | 411 |
| 412 private: | 412 private: |
| 413 // GrDrawTarget overrides | 413 // GrDrawTarget overrides |
| 414 virtual bool onReserveVertexSpace(size_t vertexSize, int vertexCount, void**
vertices) SK_OVERRIDE; | 414 virtual bool onReserveVertexSpace(size_t vertexSize, int vertexCount, void**
vertices) SK_OVERRIDE; |
| 415 virtual bool onReserveIndexSpace(int indexCount, void** indices) SK_OVERRIDE
; | 415 virtual bool onReserveIndexSpace(int indexCount, void** indices) SK_OVERRIDE
; |
| 416 virtual void releaseReservedVertexSpace() SK_OVERRIDE; | 416 virtual void releaseReservedVertexSpace() SK_OVERRIDE; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 // these are mutable so they can be created on-demand | 531 // these are mutable so they can be created on-demand |
| 532 mutable GrVertexBuffer* fUnitSqu
areVertexBuffer; | 532 mutable GrVertexBuffer* fUnitSqu
areVertexBuffer; |
| 533 mutable GrIndexBuffer* fQuadInd
exBuffer; | 533 mutable GrIndexBuffer* fQuadInd
exBuffer; |
| 534 bool fContext
IsDirty; | 534 bool fContext
IsDirty; |
| 535 ResourceList fResourc
eList; | 535 ResourceList fResourc
eList; |
| 536 | 536 |
| 537 typedef GrDrawTarget INHERITED; | 537 typedef GrDrawTarget INHERITED; |
| 538 }; | 538 }; |
| 539 | 539 |
| 540 #endif | 540 #endif |
| OLD | NEW |