| 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 GrClearBatch_DEFINED | 8 #ifndef GrClearBatch_DEFINED |
| 9 #define GrClearBatch_DEFINED | 9 #define GrClearBatch_DEFINED |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 , fRenderTarget(rt) { | 24 , fRenderTarget(rt) { |
| 25 fBounds = SkRect::Make(rect); | 25 fBounds = SkRect::Make(rect); |
| 26 } | 26 } |
| 27 | 27 |
| 28 const char* name() const override { return "Clear"; } | 28 const char* name() const override { return "Clear"; } |
| 29 | 29 |
| 30 uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()-
>getUniqueID(); } | 30 uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()-
>getUniqueID(); } |
| 31 | 31 |
| 32 SkString dumpInfo() const override { | 32 SkString dumpInfo() const override { |
| 33 SkString string; | 33 SkString string; |
| 34 string.printf("Color: 0x%08x, Rect [L: %d, T: %d, R: %d, B: %d], RT: 0x%
p", | 34 string.printf("Color: 0x%08x, Rect [L: %d, T: %d, R: %d, B: %d], RT: %d"
, |
| 35 fColor, fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBott
om, | 35 fColor, fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBott
om, |
| 36 fRenderTarget.get()); | 36 fRenderTarget.get()->getUniqueID()); |
| 37 return string; | 37 return string; |
| 38 } | 38 } |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { | 41 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { |
| 42 // We could combine clears. TBD how much complexity to put here. | 42 // We could combine clears. TBD how much complexity to put here. |
| 43 return false; | 43 return false; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void onPrepare(GrBatchFlushState*) override {} | 46 void onPrepare(GrBatchFlushState*) override {} |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 } | 90 } |
| 91 | 91 |
| 92 SkIRect fRect; | 92 SkIRect fRect; |
| 93 bool fInsideClip; | 93 bool fInsideClip; |
| 94 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; | 94 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; |
| 95 | 95 |
| 96 typedef GrBatch INHERITED; | 96 typedef GrBatch INHERITED; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 #endif | 99 #endif |
| OLD | NEW |