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

Unified Diff: src/gpu/GrShape.cpp

Issue 2064753003: Remove style application from GrPathRenderer subclasses (Closed) Base URL: https://chromium.googlesource.com/skia.git@pathshape
Patch Set: rebase Created 4 years, 6 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 | src/gpu/GrStyle.h » ('j') | src/gpu/batches/GrAADistanceFieldPathRenderer.h » ('J')
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 b40d696b824efb027df65d3c7944fc5dbed3097c..be5b09eac22dbf9847cf260d48a1f2cb2eb4548d 100644
--- a/src/gpu/GrShape.cpp
+++ b/src/gpu/GrShape.cpp
@@ -38,6 +38,7 @@ GrShape& GrShape::operator=(const GrShape& that) {
fInheritedKey.reset(that.fInheritedKey.count());
sk_careful_memcpy(fInheritedKey.get(), that.fInheritedKey.get(),
sizeof(uint32_t) * fInheritedKey.count());
+ SkASSERT((Type::kPath == fType) == SkToBool(fPath.getMaybeNull()));
bsalomon 2016/06/24 20:53:33 Ignore all these. I meant to delete these asserts.
return *this;
}
@@ -182,6 +183,7 @@ GrShape::GrShape(const GrShape& that) : fType(that.fType), fStyle(that.fStyle) {
fInheritedKey.reset(that.fInheritedKey.count());
sk_careful_memcpy(fInheritedKey.get(), that.fInheritedKey.get(),
sizeof(uint32_t) * fInheritedKey.count());
+ SkASSERT((Type::kPath == fType) == SkToBool(fPath.getMaybeNull()));
}
GrShape::GrShape(const GrShape& parent, GrStyle::Apply apply, SkScalar scale) {
@@ -268,6 +270,7 @@ GrShape::GrShape(const GrShape& parent, GrStyle::Apply apply, SkScalar scale) {
}
this->attemptToSimplifyPath();
this->setInheritedKey(*parentForKey, apply, scale);
+ SkASSERT((Type::kPath == fType) == SkToBool(fPath.getMaybeNull()));
}
void GrShape::attemptToSimplifyPath() {
« no previous file with comments | « no previous file | src/gpu/GrStyle.h » ('j') | src/gpu/batches/GrAADistanceFieldPathRenderer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698