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

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

Issue 1121463002: Move bounds to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years, 7 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/GrTargetCommands.h ('k') | src/gpu/GrTestBatch.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 "GrTessellatingPathRenderer.h" 8 #include "GrTessellatingPathRenderer.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 private: 1478 private:
1479 TessellatingPathBatch(const GrColor& color, 1479 TessellatingPathBatch(const GrColor& color,
1480 const SkPath& path, 1480 const SkPath& path,
1481 const SkMatrix& viewMatrix, 1481 const SkMatrix& viewMatrix,
1482 const SkRect& clipBounds) 1482 const SkRect& clipBounds)
1483 : fColor(color) 1483 : fColor(color)
1484 , fPath(path) 1484 , fPath(path)
1485 , fViewMatrix(viewMatrix) 1485 , fViewMatrix(viewMatrix)
1486 , fClipBounds(clipBounds) { 1486 , fClipBounds(clipBounds) {
1487 this->initClassID<TessellatingPathBatch>(); 1487 this->initClassID<TessellatingPathBatch>();
1488
1489 fBounds = path.getBounds();
1490 viewMatrix.mapRect(&fBounds);
1488 } 1491 }
1489 1492
1490 GrColor fColor; 1493 GrColor fColor;
1491 SkPath fPath; 1494 SkPath fPath;
1492 SkMatrix fViewMatrix; 1495 SkMatrix fViewMatrix;
1493 SkRect fClipBounds; // in source space 1496 SkRect fClipBounds; // in source space
1494 GrPipelineInfo fPipelineInfo; 1497 GrPipelineInfo fPipelineInfo;
1495 }; 1498 };
1496 1499
1497 bool GrTessellatingPathRenderer::onDrawPath(GrDrawTarget* target, 1500 bool GrTessellatingPathRenderer::onDrawPath(GrDrawTarget* target,
(...skipping 15 matching lines...) Expand all
1513 SkMatrix vmi; 1516 SkMatrix vmi;
1514 if (!viewM.invert(&vmi)) { 1517 if (!viewM.invert(&vmi)) {
1515 return false; 1518 return false;
1516 } 1519 }
1517 vmi.mapRect(&clipBounds); 1520 vmi.mapRect(&clipBounds);
1518 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM , clipBounds)); 1521 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM , clipBounds));
1519 target->drawBatch(pipelineBuilder, batch); 1522 target->drawBatch(pipelineBuilder, batch);
1520 1523
1521 return true; 1524 return true;
1522 } 1525 }
OLDNEW
« no previous file with comments | « src/gpu/GrTargetCommands.h ('k') | src/gpu/GrTestBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698