Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: src/gpu/GrImmediateDrawTarget.cpp

Issue 1275543005: Move some work from backend onClear to base class clear (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Pass references and rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrImmediateDrawTarget.h ('k') | src/gpu/GrReorderCommandBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 batch->generateGeometry(&fBatchTarget); 42 batch->generateGeometry(&fBatchTarget);
43 batch->setNumberOfDraws(fBatchTarget.numberOfDraws()); 43 batch->setNumberOfDraws(fBatchTarget.numberOfDraws());
44 44
45 fBatchTarget.preFlush(); 45 fBatchTarget.preFlush();
46 fBatchTarget.flushNext(batch->numberOfDraws()); 46 fBatchTarget.flushNext(batch->numberOfDraws());
47 fBatchTarget.postFlush(); 47 fBatchTarget.postFlush();
48 48
49 pipeline->~GrPipeline(); 49 pipeline->~GrPipeline();
50 } 50 }
51 51
52 void GrImmediateDrawTarget::onClear(const SkIRect* rect, GrColor color, 52 void GrImmediateDrawTarget::onClear(const SkIRect& rect, GrColor color,
53 bool canIgnoreRect, GrRenderTarget* renderTa rget) { 53 GrRenderTarget* renderTarget) {
54 this->getGpu()->clear(rect, color, canIgnoreRect, renderTarget); 54 this->getGpu()->clear(rect, color, renderTarget);
55 } 55 }
56 56
57 void GrImmediateDrawTarget::onCopySurface(GrSurface* dst, 57 void GrImmediateDrawTarget::onCopySurface(GrSurface* dst,
58 GrSurface* src, 58 GrSurface* src,
59 const SkIRect& srcRect, 59 const SkIRect& srcRect,
60 const SkIPoint& dstPoint) { 60 const SkIPoint& dstPoint) {
61 this->getGpu()->copySurface(dst, src, srcRect, dstPoint); 61 this->getGpu()->copySurface(dst, src, srcRect, dstPoint);
62 } 62 }
63 63
64 void GrImmediateDrawTarget::clearStencilClip(const SkIRect& rect, 64 void GrImmediateDrawTarget::clearStencilClip(const SkIRect& rect,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel ine) { 99 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel ine) {
100 const GrXferProcessor& xp = *pipeline->getXferProcessor(); 100 const GrXferProcessor& xp = *pipeline->getXferProcessor();
101 GrRenderTarget* rt = pipeline->getRenderTarget(); 101 GrRenderTarget* rt = pipeline->getRenderTarget();
102 102
103 GrXferBarrierType barrierType; 103 GrXferBarrierType barrierType;
104 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { 104 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) {
105 this->getGpu()->xferBarrier(rt, barrierType); 105 this->getGpu()->xferBarrier(rt, barrierType);
106 } 106 }
107 } 107 }
OLDNEW
« no previous file with comments | « src/gpu/GrImmediateDrawTarget.h ('k') | src/gpu/GrReorderCommandBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698