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

Unified Diff: src/gpu/GrShape.cpp

Issue 2369513002: Don't compute path keys for volatile paths in GrShape. (Closed)
Patch Set: fix test Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/GpuDrawPathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrShape.cpp
diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp
index 12fdd3bc1464d6a5bffc76c4656afdfa35b35938..7e0a3a4449e5a7b3745f178e5dbea42ee448beb0 100644
--- a/src/gpu/GrShape.cpp
+++ b/src/gpu/GrShape.cpp
@@ -132,13 +132,13 @@ int GrShape::unstyledKeySize() const {
// 4 for the end points and 1 for the inverseness
return 5;
case Type::kPath: {
+ if (0 == fPathData.fGenID) {
+ return -1;
+ }
int dataKeySize = path_key_from_data_size(fPathData.fPath);
if (dataKeySize >= 0) {
return dataKeySize;
}
- if (0 == fPathData.fGenID) {
- return -1;
- }
// The key is the path ID and fill type.
return 2;
}
@@ -172,12 +172,12 @@ void GrShape::writeUnstyledKey(uint32_t* key) const {
*key++ = fLineData.fInverted ? 1 : 0;
break;
case Type::kPath: {
+ SkASSERT(fPathData.fGenID);
int dataKeySize = path_key_from_data_size(fPathData.fPath);
if (dataKeySize >= 0) {
write_path_key_from_data(fPathData.fPath, key);
return;
}
- SkASSERT(fPathData.fGenID);
*key++ = fPathData.fGenID;
// We could canonicalize the fill rule for paths that don't differentiate between
// even/odd or winding fill (e.g. convex).
« no previous file with comments | « no previous file | tests/GpuDrawPathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698