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

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

Issue 2110853004: Even more hiding of Geometry structs in GrBatch subclasses. (Closed) Base URL: https://chromium.googlesource.com/skia.git@moregeom
Patch Set: Address comments Created 4 years, 5 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 | « no previous file | src/gpu/batches/GrAALinearizingConvexPathRenderer.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 "GrBatchTest.h" 8 #include "GrBatchTest.h"
9 #include "GrColor.h" 9 #include "GrColor.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 const SkRSXform xform[], 578 const SkRSXform xform[],
579 const SkRect texRect[], 579 const SkRect texRect[],
580 const SkColor colors[]) { 580 const SkColor colors[]) {
581 ASSERT_SINGLE_OWNER 581 ASSERT_SINGLE_OWNER
582 RETURN_IF_ABANDONED 582 RETURN_IF_ABANDONED
583 SkDEBUGCODE(this->validate();) 583 SkDEBUGCODE(this->validate();)
584 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawAtlas"); 584 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawAtlas");
585 585
586 AutoCheckFlush acf(fDrawingManager); 586 AutoCheckFlush acf(fDrawingManager);
587 587
588 GrDrawAtlasBatch::Geometry geometry; 588 SkAutoTUnref<GrDrawBatch> batch(new GrDrawAtlasBatch(paint.getColor(), viewM atrix, spriteCount,
589 geometry.fColor = paint.getColor(); 589 xform, texRect, colors) );
590 SkAutoTUnref<GrDrawBatch> batch(GrDrawAtlasBatch::Create(geometry, viewMatri x, spriteCount,
591 xform, texRect, col ors));
592 590
593 GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint)); 591 GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint));
594 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); 592 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
595 } 593 }
596 594
597 /////////////////////////////////////////////////////////////////////////////// 595 ///////////////////////////////////////////////////////////////////////////////
598 596
599 void GrDrawContext::drawRRect(const GrClip& clip, 597 void GrDrawContext::drawRRect(const GrClip& clip,
600 const GrPaint& paint, 598 const GrPaint& paint,
601 const SkMatrix& viewMatrix, 599 const SkMatrix& viewMatrix,
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 1031
1034 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr Clip& clip, 1032 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr Clip& clip,
1035 GrDrawBatch* batch) { 1033 GrDrawBatch* batch) {
1036 ASSERT_SINGLE_OWNER 1034 ASSERT_SINGLE_OWNER
1037 RETURN_IF_ABANDONED 1035 RETURN_IF_ABANDONED
1038 SkDEBUGCODE(this->validate();) 1036 SkDEBUGCODE(this->validate();)
1039 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); 1037 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch");
1040 1038
1041 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); 1039 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
1042 } 1040 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698