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 |
11 #include "GrDrawTarget.h" | 11 #include "GrDrawTarget.h" |
12 | 12 |
13 #include "GrBatchTarget.h" | 13 #include "GrBatchFlushState.h" |
14 | 14 |
15 /** | 15 /** |
16 * A debug GrDrawTarget which immediately flushes every command it receives | 16 * A debug GrDrawTarget which immediately flushes every command it receives |
17 */ | 17 */ |
18 class GrImmediateDrawTarget : public GrClipTarget { | 18 class GrImmediateDrawTarget : public GrClipTarget { |
19 public: | 19 public: |
20 /** | 20 /** |
21 * Creates a GrImmediateDrawTarget | 21 * Creates a GrImmediateDrawTarget |
22 * | 22 * |
23 * @param context the context object that owns this draw buffer. | 23 * @param context the context object that owns this draw buffer. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void onClear(const SkIRect& rect, | 65 void onClear(const SkIRect& rect, |
66 GrColor color, | 66 GrColor color, |
67 GrRenderTarget* renderTarget) override; | 67 GrRenderTarget* renderTarget) override; |
68 void onCopySurface(GrSurface* dst, | 68 void onCopySurface(GrSurface* dst, |
69 GrSurface* src, | 69 GrSurface* src, |
70 const SkIRect& srcRect, | 70 const SkIRect& srcRect, |
71 const SkIPoint& dstPoint) override; | 71 const SkIPoint& dstPoint) override; |
72 | 72 |
73 bool isIssued(uint32_t drawID) override { return drawID != fDrawID; } | 73 bool isIssued(uint32_t drawID) override { return drawID != fDrawID; } |
74 | 74 |
75 GrBatchTarget fBatchTarget; | |
76 uint32_t fDrawID; | 75 uint32_t fDrawID; |
77 | 76 |
78 typedef GrClipTarget INHERITED; | 77 typedef GrClipTarget INHERITED; |
79 }; | 78 }; |
80 | 79 |
81 #endif | 80 #endif |
OLD | NEW |