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

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

Issue 1471083002: Add debug option to clip each GrBatch to its device bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@clipbounds
Patch Set: update 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/GrDrawingManager.h ('k') | src/gpu/GrTest.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 "GrAtlasTextContext.h" 8 #include "GrAtlasTextContext.h"
9 #include "GrDrawContext.h" 9 #include "GrDrawContext.h"
10 #include "GrDrawingManager.h" 10 #include "GrDrawingManager.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 if (fDrawTargets.count()) { 145 if (fDrawTargets.count()) {
146 SkASSERT(fDrawTargets.count() == 1); 146 SkASSERT(fDrawTargets.count() == 1);
147 // In the non-MDB-world the same drawTarget gets reused for multiple ren der targets. 147 // In the non-MDB-world the same drawTarget gets reused for multiple ren der targets.
148 // Update this pointer so all the asserts are happy 148 // Update this pointer so all the asserts are happy
149 rt->setLastDrawTarget(fDrawTargets[0]); 149 rt->setLastDrawTarget(fDrawTargets[0]);
150 // DrawingManager gets the creation ref - this ref is for the caller 150 // DrawingManager gets the creation ref - this ref is for the caller
151 return SkRef(fDrawTargets[0]); 151 return SkRef(fDrawTargets[0]);
152 } 152 }
153 #endif 153 #endif
154 154
155 GrDrawTarget* dt = new GrDrawTarget(rt, fContext->getGpu(), fContext->resour ceProvider()); 155 GrDrawTarget* dt = new GrDrawTarget(rt, fContext->getGpu(), fContext->resour ceProvider(),
156 fOptionsForDrawTargets);
156 157
157 *fDrawTargets.append() = dt; 158 *fDrawTargets.append() = dt;
158 159
159 // DrawingManager gets the creation ref - this ref is for the caller 160 // DrawingManager gets the creation ref - this ref is for the caller
160 return SkRef(dt); 161 return SkRef(dt);
161 } 162 }
162 163
163 /* 164 /*
164 * This method finds a path renderer that can draw the specified path on 165 * This method finds a path renderer that can draw the specified path on
165 * the provided target. 166 * the provided target.
(...skipping 21 matching lines...) Expand all
187 } 188 }
188 189
189 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, 190 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt,
190 const SkSurfaceProps* surfaceProps) { 191 const SkSurfaceProps* surfaceProps) {
191 if (this->abandoned()) { 192 if (this->abandoned()) {
192 return nullptr; 193 return nullptr;
193 } 194 }
194 195
195 return new GrDrawContext(this, rt, surfaceProps); 196 return new GrDrawContext(this, rt, surfaceProps);
196 } 197 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawingManager.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698