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

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

Issue 1409753008: Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 1 month 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/GrTextureParamsAdjuster.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 2015 Google Inc. 3 * Copyright 2015 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 "GrAtlasTextContext.h" 9 #include "GrAtlasTextContext.h"
10 #include "GrBatchTest.h" 10 #include "GrBatchTest.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // is enabled because it can cause ugly artifacts. 315 // is enabled because it can cause ugly artifacts.
316 pipelineBuilder.setState(GrPipelineBuilder::kSnapVerticesToPixelCenters_ Flag, 316 pipelineBuilder.setState(GrPipelineBuilder::kSnapVerticesToPixelCenters_ Flag,
317 snapToPixelCenters); 317 snapToPixelCenters);
318 this->getDrawTarget()->drawBatch(pipelineBuilder, batch); 318 this->getDrawTarget()->drawBatch(pipelineBuilder, batch);
319 } else { 319 } else {
320 // filled BW rect 320 // filled BW rect
321 this->getDrawTarget()->drawNonAARect(pipelineBuilder, color, viewMatrix, rect); 321 this->getDrawTarget()->drawNonAARect(pipelineBuilder, color, viewMatrix, rect);
322 } 322 }
323 } 323 }
324 324
325 void GrDrawContext::drawNonAARectToRect(const GrClip& clip, 325 void GrDrawContext::fillRectToRect(const GrClip& clip,
326 const GrPaint& paint, 326 const GrPaint& paint,
327 const SkMatrix& viewMatrix, 327 const SkMatrix& viewMatrix,
328 const SkRect& rectToDraw, 328 const SkRect& rectToDraw,
329 const SkRect& localRect) { 329 const SkRect& localRect) {
330 RETURN_IF_ABANDONED 330 RETURN_IF_ABANDONED
331 SkDEBUGCODE(this->validate();) 331 SkDEBUGCODE(this->validate();)
332 332
333 AutoCheckFlush acf(fDrawingManager); 333 AutoCheckFlush acf(fDrawingManager);
334 334
335 GrPipelineBuilder pipelineBuilder(paint, fRenderTarget, clip); 335 GrPipelineBuilder pipelineBuilder(paint, fRenderTarget, clip);
336 this->getDrawTarget()->drawNonAARect(pipelineBuilder, 336 this->getDrawTarget()->drawNonAARect(pipelineBuilder,
337 paint.getColor(), 337 paint.getColor(),
338 viewMatrix, 338 viewMatrix,
339 rectToDraw, 339 rectToDraw,
340 localRect); 340 localRect);
341 } 341 }
342 342
343 void GrDrawContext::drawNonAARectWithLocalMatrix(const GrClip& clip, 343 void GrDrawContext::fillRectWithLocalMatrix(const GrClip& clip,
344 const GrPaint& paint, 344 const GrPaint& paint,
345 const SkMatrix& viewMatrix, 345 const SkMatrix& viewMatrix,
346 const SkRect& rectToDraw, 346 const SkRect& rectToDraw,
347 const SkMatrix& localMatrix) { 347 const SkMatrix& localMatrix) {
348 RETURN_IF_ABANDONED 348 RETURN_IF_ABANDONED
349 SkDEBUGCODE(this->validate();) 349 SkDEBUGCODE(this->validate();)
350 350
351 AutoCheckFlush acf(fDrawingManager); 351 AutoCheckFlush acf(fDrawingManager);
352 352
353 GrPipelineBuilder pipelineBuilder(paint, fRenderTarget, clip); 353 GrPipelineBuilder pipelineBuilder(paint, fRenderTarget, clip);
354 this->getDrawTarget()->drawNonAARect(pipelineBuilder, 354 this->getDrawTarget()->drawNonAARect(pipelineBuilder,
355 paint.getColor(), 355 paint.getColor(),
356 viewMatrix, 356 viewMatrix,
357 rectToDraw, 357 rectToDraw,
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 args.fAntiAlias = useCoverageAA; 765 args.fAntiAlias = useCoverageAA;
766 pr->drawPath(args); 766 pr->drawPath(args);
767 } 767 }
768 768
769 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { 769 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) {
770 RETURN_IF_ABANDONED 770 RETURN_IF_ABANDONED
771 SkDEBUGCODE(this->validate();) 771 SkDEBUGCODE(this->validate();)
772 772
773 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); 773 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch);
774 } 774 }
OLDNEW
« no previous file with comments | « src/gpu/GrBlurUtils.cpp ('k') | src/gpu/GrTextureParamsAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698