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

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

Issue 2230513004: Re-adding analytical GeoProc for rectangles (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Addressed patch 2 comments Created 4 years, 4 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/GrBatchTest.cpp ('k') | src/gpu/batches/GrAnalyticRectBatch.h » ('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 "GrBatchTest.h" 8 #include "GrBatchTest.h"
9 #include "GrColor.h" 9 #include "GrColor.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 return true; 378 return true;
379 } 379 }
380 } 380 }
381 381
382 if (should_apply_coverage_aa(paint, fRenderTarget.get(), &useHWAA)) { 382 if (should_apply_coverage_aa(paint, fRenderTarget.get(), &useHWAA)) {
383 // The fill path can handle rotation but not skew. 383 // The fill path can handle rotation but not skew.
384 if (view_matrix_ok_for_aa_fill_rect(viewMatrix)) { 384 if (view_matrix_ok_for_aa_fill_rect(viewMatrix)) {
385 SkRect devBoundRect; 385 SkRect devBoundRect;
386 viewMatrix.mapRect(&devBoundRect, croppedRect); 386 viewMatrix.mapRect(&devBoundRect, croppedRect);
387 387
388 batch.reset(GrRectBatchFactory::CreateAAFill(paint.getColor(), viewM atrix, 388 batch.reset(GrRectBatchFactory::CreateAAFill(paint, viewMatrix, rect , croppedRect,
389 croppedRect, devBoundRe ct)); 389 devBoundRect));
390 if (batch) { 390 if (batch) {
391 GrPipelineBuilder pipelineBuilder(paint, useHWAA); 391 GrPipelineBuilder pipelineBuilder(paint, useHWAA);
392 if (ss) { 392 if (ss) {
393 pipelineBuilder.setUserStencil(ss); 393 pipelineBuilder.setUserStencil(ss);
394 } 394 }
395 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, ba tch); 395 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, ba tch);
396 return true; 396 return true;
397 } 397 }
398 } 398 }
399 } else { 399 } else {
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 1298
1299 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr Clip& clip, 1299 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr Clip& clip,
1300 GrDrawBatch* batch) { 1300 GrDrawBatch* batch) {
1301 ASSERT_SINGLE_OWNER 1301 ASSERT_SINGLE_OWNER
1302 RETURN_IF_ABANDONED 1302 RETURN_IF_ABANDONED
1303 SkDEBUGCODE(this->validate();) 1303 SkDEBUGCODE(this->validate();)
1304 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); 1304 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch");
1305 1305
1306 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); 1306 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
1307 } 1307 }
OLDNEW
« no previous file with comments | « src/gpu/GrBatchTest.cpp ('k') | src/gpu/batches/GrAnalyticRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698