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

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

Issue 1161063003: Revert "Revert of Move copy-surface-as-draw fallback to GrGLGpu. (patchset #12 id:220001 of https:/… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 5 years, 6 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/GrInOrderDrawBuffer.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SkASSERT(this->getGpu()->canCopySurface(dst, src, srcRect, dstPoint));
60 this->getGpu()->copySurface(dst, src, srcRect, dstPoint);
61 }
62
63 void GrImmediateDrawTarget::clearStencilClip(const SkIRect& rect, 55 void GrImmediateDrawTarget::clearStencilClip(const SkIRect& rect,
64 bool insideClip, 56 bool insideClip,
65 GrRenderTarget* renderTarget) { 57 GrRenderTarget* renderTarget) {
66 this->getGpu()->clearStencilClip(rect, insideClip, renderTarget); 58 this->getGpu()->clearStencilClip(rect, insideClip, renderTarget);
67 } 59 }
68 60
69 void GrImmediateDrawTarget::discard(GrRenderTarget* renderTarget) { 61 void GrImmediateDrawTarget::discard(GrRenderTarget* renderTarget) {
70 if (!this->caps()->discardRenderTargetSupport()) { 62 if (!this->caps()->discardRenderTargetSupport()) {
71 return; 63 return;
72 } 64 }
(...skipping 24 matching lines...) Expand all
97 89
98 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel ine) { 90 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel ine) {
99 const GrXferProcessor& xp = *pipeline->getXferProcessor(); 91 const GrXferProcessor& xp = *pipeline->getXferProcessor();
100 GrRenderTarget* rt = pipeline->getRenderTarget(); 92 GrRenderTarget* rt = pipeline->getRenderTarget();
101 93
102 GrXferBarrierType barrierType; 94 GrXferBarrierType barrierType;
103 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { 95 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) {
104 this->getGpu()->xferBarrier(rt, barrierType); 96 this->getGpu()->xferBarrier(rt, barrierType);
105 } 97 }
106 } 98 }
OLDNEW
« no previous file with comments | « src/gpu/GrImmediateDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698