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 GrGLGpu_DEFINED | 8 #ifndef GrGLGpu_DEFINED |
9 #define GrGLGpu_DEFINED | 9 #define GrGLGpu_DEFINED |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 bool copySurface(GrSurface* dst, | 98 bool copySurface(GrSurface* dst, |
99 GrSurface* src, | 99 GrSurface* src, |
100 const SkIRect& srcRect, | 100 const SkIRect& srcRect, |
101 const SkIPoint& dstPoint) override; | 101 const SkIPoint& dstPoint) override; |
102 | 102 |
103 bool canCopySurface(const GrSurface* dst, | 103 bool canCopySurface(const GrSurface* dst, |
104 const GrSurface* src, | 104 const GrSurface* src, |
105 const SkIRect& srcRect, | 105 const SkIRect& srcRect, |
106 const SkIPoint& dstPoint) override; | 106 const SkIPoint& dstPoint) override; |
107 | 107 |
| 108 void setXferBarrier(GrXferBarrierType) override; |
| 109 |
108 void buildProgramDesc(GrProgramDesc*, | 110 void buildProgramDesc(GrProgramDesc*, |
109 const GrPrimitiveProcessor&, | 111 const GrPrimitiveProcessor&, |
110 const GrPipeline&, | 112 const GrPipeline&, |
111 const GrBatchTracker&) const override; | 113 const GrBatchTracker&) const override; |
112 | 114 |
113 private: | 115 private: |
114 // GrGpu overrides | 116 // GrGpu overrides |
115 void onResetContext(uint32_t resetBits) override; | 117 void onResetContext(uint32_t resetBits) override; |
116 | 118 |
117 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted, const v
oid* srcData, | 119 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted, const v
oid* srcData, |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 // We return a non-const pointer to this from bindArrayAndBuffersToDraw
when vertex array 0 | 429 // We return a non-const pointer to this from bindArrayAndBuffersToDraw
when vertex array 0 |
428 // is bound. However, this class is internal to GrGLGpu and this object
never leaks out of | 430 // is bound. However, this class is internal to GrGLGpu and this object
never leaks out of |
429 // GrGLGpu. | 431 // GrGLGpu. |
430 GrGLAttribArrayState fDefaultVertexArrayAttribState; | 432 GrGLAttribArrayState fDefaultVertexArrayAttribState; |
431 | 433 |
432 // This is used when we're using a core profile and the vertices are in
a VBO. | 434 // This is used when we're using a core profile and the vertices are in
a VBO. |
433 GrGLVertexArray* fVBOVertexArray; | 435 GrGLVertexArray* fVBOVertexArray; |
434 } fHWGeometryState; | 436 } fHWGeometryState; |
435 | 437 |
436 struct { | 438 struct { |
| 439 GrBlendEquation fEquation; |
437 GrBlendCoeff fSrcCoeff; | 440 GrBlendCoeff fSrcCoeff; |
438 GrBlendCoeff fDstCoeff; | 441 GrBlendCoeff fDstCoeff; |
439 GrColor fConstColor; | 442 GrColor fConstColor; |
440 bool fConstColorValid; | 443 bool fConstColorValid; |
441 TriState fEnabled; | 444 TriState fEnabled; |
442 | 445 |
443 void invalidate() { | 446 void invalidate() { |
| 447 fEquation = kInvalid_GrBlendEquation; |
444 fSrcCoeff = kInvalid_GrBlendCoeff; | 448 fSrcCoeff = kInvalid_GrBlendCoeff; |
445 fDstCoeff = kInvalid_GrBlendCoeff; | 449 fDstCoeff = kInvalid_GrBlendCoeff; |
446 fConstColorValid = false; | 450 fConstColorValid = false; |
447 fEnabled = kUnknown_TriState; | 451 fEnabled = kUnknown_TriState; |
448 } | 452 } |
449 } fHWBlendState; | 453 } fHWBlendState; |
450 | 454 |
451 TriState fMSAAEnabled; | 455 TriState fMSAAEnabled; |
452 | 456 |
453 GrStencilSettings fHWStencilSettings; | 457 GrStencilSettings fHWStencilSettings; |
(...skipping 10 matching lines...) Expand all Loading... |
464 | 468 |
465 // we record what stencil format worked last time to hopefully exit early | 469 // we record what stencil format worked last time to hopefully exit early |
466 // from our loop that tries stencil formats and calls check fb status. | 470 // from our loop that tries stencil formats and calls check fb status. |
467 int fLastSuccessfulStencilFmtIdx; | 471 int fLastSuccessfulStencilFmtIdx; |
468 | 472 |
469 typedef GrGpu INHERITED; | 473 typedef GrGpu INHERITED; |
470 friend class GrGLPathRendering; // For accessing setTextureUnit. | 474 friend class GrGLPathRendering; // For accessing setTextureUnit. |
471 }; | 475 }; |
472 | 476 |
473 #endif | 477 #endif |
OLD | NEW |