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

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

Issue 809843002: Remove GrGpu::flushGraphicsState (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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/GrGpu.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 /* 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 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 4); 270 4);
271 } 271 }
272 272
273 return fQuadIndexBuffer; 273 return fQuadIndexBuffer;
274 } 274 }
275 275
276 //////////////////////////////////////////////////////////////////////////////// 276 ////////////////////////////////////////////////////////////////////////////////
277 277
278 void GrGpu::draw(const GrOptDrawState& ds, const GrDrawTarget::DrawInfo& info) { 278 void GrGpu::draw(const GrOptDrawState& ds, const GrDrawTarget::DrawInfo& info) {
279 this->handleDirtyContext(); 279 this->handleDirtyContext();
280 if (!this->flushGraphicsState(ds)) {
281 return;
282 }
283 this->onDraw(ds, info); 280 this->onDraw(ds, info);
284 } 281 }
285 282
286 void GrGpu::stencilPath(const GrOptDrawState& ds, 283 void GrGpu::stencilPath(const GrOptDrawState& ds,
287 const GrPath* path, 284 const GrPath* path,
288 const GrStencilSettings& stencilSettings) { 285 const GrStencilSettings& stencilSettings) {
289 this->handleDirtyContext(); 286 this->handleDirtyContext();
290 287 this->onStencilPath(ds, path, stencilSettings);
291 if (!this->flushGraphicsState(ds)) {
292 return;
293 }
294
295 this->pathRendering()->stencilPath(path, stencilSettings);
296 } 288 }
297 289
298
299 void GrGpu::drawPath(const GrOptDrawState& ds, 290 void GrGpu::drawPath(const GrOptDrawState& ds,
300 const GrPath* path, 291 const GrPath* path,
301 const GrStencilSettings& stencilSettings) { 292 const GrStencilSettings& stencilSettings) {
302 this->handleDirtyContext(); 293 this->handleDirtyContext();
303 294 this->onDrawPath(ds, path, stencilSettings);
304 if (!this->flushGraphicsState(ds)) {
305 return;
306 }
307
308 this->pathRendering()->drawPath(path, stencilSettings);
309 } 295 }
310 296
311 void GrGpu::drawPaths(const GrOptDrawState& ds, 297 void GrGpu::drawPaths(const GrOptDrawState& ds,
312 const GrPathRange* pathRange, 298 const GrPathRange* pathRange,
313 const void* indices, 299 const void* indices,
314 GrDrawTarget::PathIndexType indexType, 300 GrDrawTarget::PathIndexType indexType,
315 const float transformValues[], 301 const float transformValues[],
316 GrDrawTarget::PathTransformType transformType, 302 GrDrawTarget::PathTransformType transformType,
317 int count, 303 int count,
318 const GrStencilSettings& stencilSettings) { 304 const GrStencilSettings& stencilSettings) {
319 this->handleDirtyContext(); 305 this->handleDirtyContext();
320
321 if (!this->flushGraphicsState(ds)) {
322 return;
323 }
324
325 pathRange->willDrawPaths(indices, indexType, count); 306 pathRange->willDrawPaths(indices, indexType, count);
326 this->pathRendering()->drawPaths(pathRange, indices, indexType, transformVal ues, 307 this->onDrawPaths(ds, pathRange, indices, indexType, transformValues,
327 transformType, count, stencilSettings); 308 transformType, count, stencilSettings);
328 } 309 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698