| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
| 9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
| 10 | 10 |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 const SkIRect& srcRect, | 759 const SkIRect& srcRect, |
| 760 const SkIPoint& dstPoint) = 0; | 760 const SkIPoint& dstPoint) = 0; |
| 761 /** | 761 /** |
| 762 * This will be called before allocating a texture to be a dst for onCopySur
face. Only the | 762 * This will be called before allocating a texture to be a dst for onCopySur
face. Only the |
| 763 * dstDesc's config, flags, and origin need be set by the function. If the s
ubclass cannot | 763 * dstDesc's config, flags, and origin need be set by the function. If the s
ubclass cannot |
| 764 * create a surface that would succeed its implementation of onCopySurface,
it should return | 764 * create a surface that would succeed its implementation of onCopySurface,
it should return |
| 765 * false. The base class will fall back to creating a render target to draw
into using the src. | 765 * false. The base class will fall back to creating a render target to draw
into using the src. |
| 766 */ | 766 */ |
| 767 virtual bool onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* d
stDesc) = 0; | 767 virtual bool onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* d
stDesc) = 0; |
| 768 | 768 |
| 769 /** |
| 770 * Inserts a boundary between render passes that touch the same pixels. This
prevents |
| 771 * Gr from batching together draw calls for which overlap is illegal, and so
me blending |
| 772 * extensions require the use of a barrier in order to guarantee coherent re
sults. |
| 773 */ |
| 774 virtual void onBlendBarrier() = 0; |
| 775 |
| 769 // helpers for reserving vertex and index space. | 776 // helpers for reserving vertex and index space. |
| 770 bool reserveVertexSpace(size_t vertexSize, | 777 bool reserveVertexSpace(size_t vertexSize, |
| 771 int vertexCount, | 778 int vertexCount, |
| 772 void** vertices); | 779 void** vertices); |
| 773 bool reserveIndexSpace(int indexCount, void** indices); | 780 bool reserveIndexSpace(int indexCount, void** indices); |
| 774 | 781 |
| 775 // called by drawIndexed and drawNonIndexed. Use a negative indexCount to | 782 // called by drawIndexed and drawNonIndexed. Use a negative indexCount to |
| 776 // indicate non-indexed drawing. | 783 // indicate non-indexed drawing. |
| 777 bool checkDraw(const GrPipelineBuilder&, | 784 bool checkDraw(const GrPipelineBuilder&, |
| 778 const GrGeometryProcessor*, | 785 const GrGeometryProcessor*, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 virtual bool setupClip(GrPipelineBuilder*, | 860 virtual bool setupClip(GrPipelineBuilder*, |
| 854 GrPipelineBuilder::AutoRestoreFragmentProcessors*, | 861 GrPipelineBuilder::AutoRestoreFragmentProcessors*, |
| 855 GrPipelineBuilder::AutoRestoreStencil*, | 862 GrPipelineBuilder::AutoRestoreStencil*, |
| 856 GrScissorState* scissorState, | 863 GrScissorState* scissorState, |
| 857 const SkRect* devBounds) override; | 864 const SkRect* devBounds) override; |
| 858 | 865 |
| 859 typedef GrDrawTarget INHERITED; | 866 typedef GrDrawTarget INHERITED; |
| 860 }; | 867 }; |
| 861 | 868 |
| 862 #endif | 869 #endif |
| OLD | NEW |