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

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

Issue 1486923004: Retract GrRenderTarget a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/GrBlurUtils.cpp ('k') | src/gpu/GrSoftwarePathRenderer.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (GrTexture* rtTex = rt->asTexture()) { 130 if (GrTexture* rtTex = rt->asTexture()) {
131 // The render target is a texture, so we can read from it directly i n the shader. The XP 131 // The render target is a texture, so we can read from it directly i n the shader. The XP
132 // will be responsible to detect this situation and request a textur e barrier. 132 // will be responsible to detect this situation and request a textur e barrier.
133 dstTexture->setTexture(rtTex); 133 dstTexture->setTexture(rtTex);
134 dstTexture->setOffset(0, 0); 134 dstTexture->setOffset(0, 0);
135 return true; 135 return true;
136 } 136 }
137 } 137 }
138 138
139 SkIRect copyRect; 139 SkIRect copyRect;
140 pipelineBuilder.clip().getConservativeBounds(rt, &copyRect); 140 pipelineBuilder.clip().getConservativeBounds(rt->width(), rt->height(), &cop yRect);
141 141
142 SkIRect drawIBounds; 142 SkIRect drawIBounds;
143 bounds.roundOut(&drawIBounds); 143 bounds.roundOut(&drawIBounds);
144 if (!copyRect.intersect(drawIBounds)) { 144 if (!copyRect.intersect(drawIBounds)) {
145 #ifdef SK_DEBUG 145 #ifdef SK_DEBUG
146 GrCapsDebugf(this->caps(), "Missed an early reject. " 146 GrCapsDebugf(this->caps(), "Missed an early reject. "
147 "Bailing on draw from setupDstReadIfNecessary .\n"); 147 "Bailing on draw from setupDstReadIfNecessary .\n");
148 #endif 148 #endif
149 return false; 149 return false;
150 } 150 }
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 } 555 }
556 556
557 return true; 557 return true;
558 } 558 }
559 559
560 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 560 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
561 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 561 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
562 this->recordBatch(batch); 562 this->recordBatch(batch);
563 batch->unref(); 563 batch->unref();
564 } 564 }
OLDNEW
« no previous file with comments | « src/gpu/GrBlurUtils.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698