| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrImmediateDrawTarget_DEFINED | 8 #ifndef GrImmediateDrawTarget_DEFINED |
| 9 #define GrImmediateDrawTarget_DEFINED | 9 #define GrImmediateDrawTarget_DEFINED |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * @param context the context object that owns this draw buffer. | 23 * @param context the context object that owns this draw buffer. |
| 24 */ | 24 */ |
| 25 GrImmediateDrawTarget(GrContext* context); | 25 GrImmediateDrawTarget(GrContext* context); |
| 26 | 26 |
| 27 ~GrImmediateDrawTarget() override; | 27 ~GrImmediateDrawTarget() override; |
| 28 | 28 |
| 29 void clearStencilClip(const SkIRect& rect, | 29 void clearStencilClip(const SkIRect& rect, |
| 30 bool insideClip, | 30 bool insideClip, |
| 31 GrRenderTarget* renderTarget) override; | 31 GrRenderTarget* renderTarget) override; |
| 32 | 32 |
| 33 void discard(GrRenderTarget*) override; | |
| 34 | |
| 35 private: | 33 private: |
| 36 void onReset() override; | 34 void onReset() override; |
| 37 void onFlush() override; | 35 void onFlush() override; |
| 38 | 36 |
| 39 // overrides from GrDrawTarget | 37 // overrides from GrDrawTarget |
| 40 void onDrawBatch(GrDrawBatch*) override; | 38 void onDrawBatch(GrBatch*) override; |
| 41 void onStencilPath(const GrPipelineBuilder&, | 39 void onStencilPath(const GrPipelineBuilder&, |
| 42 const GrPathProcessor*, | 40 const GrPathProcessor*, |
| 43 const GrPath*, | 41 const GrPath*, |
| 44 const GrScissorState&, | 42 const GrScissorState&, |
| 45 const GrStencilSettings&) override { | 43 const GrStencilSettings&) override { |
| 46 SkFAIL("Only batch implemented\n"); | 44 SkFAIL("Only batch implemented\n"); |
| 47 } | 45 } |
| 48 void onDrawPath(const GrPathProcessor*, | 46 void onDrawPath(const GrPathProcessor*, |
| 49 const GrPath*, | 47 const GrPath*, |
| 50 const GrStencilSettings&, | 48 const GrStencilSettings&, |
| 51 const PipelineInfo&) override { | 49 const PipelineInfo&) override { |
| 52 SkFAIL("Only batch implemented\n"); | 50 SkFAIL("Only batch implemented\n"); |
| 53 } | 51 } |
| 54 void onDrawPaths(const GrPathProcessor*, | 52 void onDrawPaths(const GrPathProcessor*, |
| 55 const GrPathRange*, | 53 const GrPathRange*, |
| 56 const void* indices, | 54 const void* indices, |
| 57 PathIndexType, | 55 PathIndexType, |
| 58 const float transformValues[], | 56 const float transformValues[], |
| 59 PathTransformType, | 57 PathTransformType, |
| 60 int count, | 58 int count, |
| 61 const GrStencilSettings&, | 59 const GrStencilSettings&, |
| 62 const PipelineInfo&) override { | 60 const PipelineInfo&) override { |
| 63 SkFAIL("Only batch implemented\n"); | 61 SkFAIL("Only batch implemented\n"); |
| 64 } | 62 } |
| 65 void onClear(const SkIRect& rect, | |
| 66 GrColor color, | |
| 67 GrRenderTarget* renderTarget) override; | |
| 68 void onCopySurface(GrSurface* dst, | 63 void onCopySurface(GrSurface* dst, |
| 69 GrSurface* src, | 64 GrSurface* src, |
| 70 const SkIRect& srcRect, | 65 const SkIRect& srcRect, |
| 71 const SkIPoint& dstPoint) override; | 66 const SkIPoint& dstPoint) override; |
| 72 | 67 |
| 73 bool isIssued(uint32_t drawID) override { return drawID != fDrawID; } | 68 bool isIssued(uint32_t drawID) override { return drawID != fDrawID; } |
| 74 | 69 |
| 75 uint32_t fDrawID; | 70 uint32_t fDrawID; |
| 76 | 71 |
| 77 typedef GrClipTarget INHERITED; | 72 typedef GrClipTarget INHERITED; |
| 78 }; | 73 }; |
| 79 | 74 |
| 80 #endif | 75 #endif |
| OLD | NEW |