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

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

Issue 1291803006: Simplify parameters passed to path renderers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add more validate methods Created 5 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/GrTessellatingPathRenderer.h ('k') | no next file » | 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 "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 return true; 1353 return true;
1354 } 1354 }
1355 return false; 1355 return false;
1356 } 1356 }
1357 1357
1358 }; 1358 };
1359 1359
1360 GrTessellatingPathRenderer::GrTessellatingPathRenderer() { 1360 GrTessellatingPathRenderer::GrTessellatingPathRenderer() {
1361 } 1361 }
1362 1362
1363 GrPathRenderer::StencilSupport GrTessellatingPathRenderer::onGetStencilSupport(
1364 const GrDrawTarget*,
1365 const GrPipelineBuil der*,
1366 const SkPath&,
1367 const GrStrokeInfo&) const {
1368 return GrPathRenderer::kNoSupport_StencilSupport;
1369 }
1370
1371 namespace { 1363 namespace {
1372 1364
1373 // When the SkPathRef genID changes, invalidate a corresponding GrResource descr ibed by key. 1365 // When the SkPathRef genID changes, invalidate a corresponding GrResource descr ibed by key.
1374 class PathInvalidator : public SkPathRef::GenIDChangeListener { 1366 class PathInvalidator : public SkPathRef::GenIDChangeListener {
1375 public: 1367 public:
1376 explicit PathInvalidator(const GrUniqueKey& key) : fMsg(key) {} 1368 explicit PathInvalidator(const GrUniqueKey& key) : fMsg(key) {}
1377 private: 1369 private:
1378 GrUniqueKeyInvalidatedMessage fMsg; 1370 GrUniqueKeyInvalidatedMessage fMsg;
1379 1371
1380 void onChange() override { 1372 void onChange() override {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 bool result = viewMatrix.invert(&vmi); 1643 bool result = viewMatrix.invert(&vmi);
1652 if (!result) { 1644 if (!result) {
1653 SkFAIL("Cannot invert matrix\n"); 1645 SkFAIL("Cannot invert matrix\n");
1654 } 1646 }
1655 vmi.mapRect(&clipBounds); 1647 vmi.mapRect(&clipBounds);
1656 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); 1648 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random);
1657 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl ipBounds); 1649 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl ipBounds);
1658 } 1650 }
1659 1651
1660 #endif 1652 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTessellatingPathRenderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698