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 #include "GrImmediateDrawTarget.h" | 8 #include "GrImmediateDrawTarget.h" |
9 | 9 |
10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 fBatchTarget.postFlush(); | 45 fBatchTarget.postFlush(); |
46 | 46 |
47 pipeline->~GrPipeline(); | 47 pipeline->~GrPipeline(); |
48 } | 48 } |
49 | 49 |
50 void GrImmediateDrawTarget::onClear(const SkIRect* rect, GrColor color, | 50 void GrImmediateDrawTarget::onClear(const SkIRect* rect, GrColor color, |
51 bool canIgnoreRect, GrRenderTarget* renderTa
rget) { | 51 bool canIgnoreRect, GrRenderTarget* renderTa
rget) { |
52 this->getGpu()->clear(rect, color, canIgnoreRect, renderTarget); | 52 this->getGpu()->clear(rect, color, canIgnoreRect, renderTarget); |
53 } | 53 } |
54 | 54 |
| 55 void GrImmediateDrawTarget::onCopySurface(GrSurface* dst, |
| 56 GrSurface* src, |
| 57 const SkIRect& srcRect, |
| 58 const SkIPoint& dstPoint) { |
| 59 this->getGpu()->copySurface(dst, src, srcRect, dstPoint); |
| 60 } |
| 61 |
55 void GrImmediateDrawTarget::clearStencilClip(const SkIRect& rect, | 62 void GrImmediateDrawTarget::clearStencilClip(const SkIRect& rect, |
56 bool insideClip, | 63 bool insideClip, |
57 GrRenderTarget* renderTarget) { | 64 GrRenderTarget* renderTarget) { |
58 this->getGpu()->clearStencilClip(rect, insideClip, renderTarget); | 65 this->getGpu()->clearStencilClip(rect, insideClip, renderTarget); |
59 } | 66 } |
60 | 67 |
61 void GrImmediateDrawTarget::discard(GrRenderTarget* renderTarget) { | 68 void GrImmediateDrawTarget::discard(GrRenderTarget* renderTarget) { |
62 if (!this->caps()->discardRenderTargetSupport()) { | 69 if (!this->caps()->discardRenderTargetSupport()) { |
63 return; | 70 return; |
64 } | 71 } |
(...skipping 24 matching lines...) Expand all Loading... |
89 | 96 |
90 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel
ine) { | 97 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel
ine) { |
91 const GrXferProcessor& xp = *pipeline->getXferProcessor(); | 98 const GrXferProcessor& xp = *pipeline->getXferProcessor(); |
92 GrRenderTarget* rt = pipeline->getRenderTarget(); | 99 GrRenderTarget* rt = pipeline->getRenderTarget(); |
93 | 100 |
94 GrXferBarrierType barrierType; | 101 GrXferBarrierType barrierType; |
95 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { | 102 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { |
96 this->getGpu()->xferBarrier(rt, barrierType); | 103 this->getGpu()->xferBarrier(rt, barrierType); |
97 } | 104 } |
98 } | 105 } |
OLD | NEW |