| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 int instanceCount, | 388 int instanceCount, |
| 389 int verticesPerInstance, | 389 int verticesPerInstance, |
| 390 int indicesPerInstance, | 390 int indicesPerInstance, |
| 391 const SkRect* devBounds = NULL); | 391 const SkRect* devBounds = NULL); |
| 392 | 392 |
| 393 /** | 393 /** |
| 394 * Clear the passed in render target. Ignores the draw state and clip. Clear
s the whole thing if | 394 * Clear the passed in render target. Ignores the draw state and clip. Clear
s the whole thing if |
| 395 * rect is NULL, otherwise just the rect. If canIgnoreRect is set then the e
ntire render target | 395 * rect is NULL, otherwise just the rect. If canIgnoreRect is set then the e
ntire render target |
| 396 * can be optionally cleared. | 396 * can be optionally cleared. |
| 397 */ | 397 */ |
| 398 virtual void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect, | 398 void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect, |
| 399 GrRenderTarget* renderTarget) = 0; | 399 GrRenderTarget* renderTarget); |
| 400 | 400 |
| 401 /** | 401 /** |
| 402 * Discards the contents render target. | 402 * Discards the contents render target. |
| 403 **/ | 403 **/ |
| 404 virtual void discard(GrRenderTarget*) = 0; | 404 virtual void discard(GrRenderTarget*) = 0; |
| 405 | 405 |
| 406 /** | 406 /** |
| 407 * Called at start and end of gpu trace marking | 407 * Called at start and end of gpu trace marking |
| 408 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th
ese at the start | 408 * GR_CREATE_GPU_TRACE_MARKER(marker_str, target) will automatically call th
ese at the start |
| 409 * and end of a code block respectively | 409 * and end of a code block respectively |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 const SkMatrix* localMatrix); | 848 const SkMatrix* localMatrix); |
| 849 | 849 |
| 850 virtual void onStencilPath(const GrPath*, GrPathRendering::FillType) = 0; | 850 virtual void onStencilPath(const GrPath*, GrPathRendering::FillType) = 0; |
| 851 virtual void onDrawPath(const GrPath*, GrPathRendering::FillType, | 851 virtual void onDrawPath(const GrPath*, GrPathRendering::FillType, |
| 852 const GrDeviceCoordTexture* dstCopy) = 0; | 852 const GrDeviceCoordTexture* dstCopy) = 0; |
| 853 virtual void onDrawPaths(const GrPathRange*, | 853 virtual void onDrawPaths(const GrPathRange*, |
| 854 const uint32_t indices[], int count, | 854 const uint32_t indices[], int count, |
| 855 const float transforms[], PathTransformType, | 855 const float transforms[], PathTransformType, |
| 856 GrPathRendering::FillType, const GrDeviceCoordTextu
re*) = 0; | 856 GrPathRendering::FillType, const GrDeviceCoordTextu
re*) = 0; |
| 857 | 857 |
| 858 virtual void onClear(const SkIRect* rect, GrColor color, bool canIgnoreRect, |
| 859 GrRenderTarget* renderTarget) = 0; |
| 860 |
| 861 |
| 858 virtual void didAddGpuTraceMarker() = 0; | 862 virtual void didAddGpuTraceMarker() = 0; |
| 859 virtual void didRemoveGpuTraceMarker() = 0; | 863 virtual void didRemoveGpuTraceMarker() = 0; |
| 860 | 864 |
| 861 // helpers for reserving vertex and index space. | 865 // helpers for reserving vertex and index space. |
| 862 bool reserveVertexSpace(size_t vertexSize, | 866 bool reserveVertexSpace(size_t vertexSize, |
| 863 int vertexCount, | 867 int vertexCount, |
| 864 void** vertices); | 868 void** vertices); |
| 865 bool reserveIndexSpace(int indexCount, void** indices); | 869 bool reserveIndexSpace(int indexCount, void** indices); |
| 866 | 870 |
| 867 // called by drawIndexed and drawNonIndexed. Use a negative indexCount to | 871 // called by drawIndexed and drawNonIndexed. Use a negative indexCount to |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 protected: | 934 protected: |
| 931 GrClipMaskManager fClipMaskManager; | 935 GrClipMaskManager fClipMaskManager; |
| 932 | 936 |
| 933 private: | 937 private: |
| 934 GrClipMaskManager* clipMaskManager() { return &fClipMaskManager; } | 938 GrClipMaskManager* clipMaskManager() { return &fClipMaskManager; } |
| 935 | 939 |
| 936 typedef GrDrawTarget INHERITED; | 940 typedef GrDrawTarget INHERITED; |
| 937 }; | 941 }; |
| 938 | 942 |
| 939 #endif | 943 #endif |
| OLD | NEW |