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

Unified Diff: src/core/SkPathRef.cpp

Issue 380473002: Missing volatile in AnnotateBenignRaceSized declaration. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: check unique define Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPixelRef.h ('k') | tools/tsan.supp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathRef.cpp
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp
index de7a8f56ae07a8939f56a05b26f6b034a2ae5f5c..e60f618b4f656203ecf4dc7b9b6db898acc5f72e 100644
--- a/src/core/SkPathRef.cpp
+++ b/src/core/SkPathRef.cpp
@@ -30,9 +30,7 @@ SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef,
//////////////////////////////////////////////////////////////////////////////
SkPathRef* SkPathRef::CreateEmptyImpl() {
- SkPathRef* p = SkNEW(SkPathRef);
- p->computeBounds(); // Preemptively avoid a race to clear fBoundsIsDirty.
- return p;
+ return SkNEW(SkPathRef);
}
SkPathRef* SkPathRef::CreateEmpty() {
@@ -85,13 +83,13 @@ void SkPathRef::CreateTransformedCopy(SkAutoTUnref<SkPathRef>* dst,
if (canXformBounds) {
(*dst)->fBoundsIsDirty = false;
if (src.fIsFinite) {
- matrix.mapRect(&(*dst)->fBounds, src.fBounds);
- if (!((*dst)->fIsFinite = (*dst)->fBounds.isFinite())) {
- (*dst)->fBounds.setEmpty();
+ matrix.mapRect((*dst)->fBounds.get(), src.fBounds);
+ if (!((*dst)->fIsFinite = (*dst)->fBounds->isFinite())) {
+ (*dst)->fBounds->setEmpty();
}
} else {
(*dst)->fIsFinite = false;
- (*dst)->fBounds.setEmpty();
+ (*dst)->fBounds->setEmpty();
}
} else {
(*dst)->fBoundsIsDirty = true;
@@ -441,14 +439,14 @@ void SkPathRef::validate() const {
SkASSERT(this->currSize() ==
fFreeSpace + sizeof(SkPoint) * fPointCnt + sizeof(uint8_t) * fVerbCnt);
- if (!fBoundsIsDirty && !fBounds.isEmpty()) {
+ if (!fBoundsIsDirty && !fBounds->isEmpty()) {
bool isFinite = true;
for (int i = 0; i < fPointCnt; ++i) {
SkASSERT(!fPoints[i].isFinite() || (
- fBounds.fLeft - fPoints[i].fX < SK_ScalarNearlyZero &&
- fPoints[i].fX - fBounds.fRight < SK_ScalarNearlyZero &&
- fBounds.fTop - fPoints[i].fY < SK_ScalarNearlyZero &&
- fPoints[i].fY - fBounds.fBottom < SK_ScalarNearlyZero));
+ fBounds->fLeft - fPoints[i].fX < SK_ScalarNearlyZero &&
+ fPoints[i].fX - fBounds->fRight < SK_ScalarNearlyZero &&
+ fBounds->fTop - fPoints[i].fY < SK_ScalarNearlyZero &&
+ fPoints[i].fY - fBounds->fBottom < SK_ScalarNearlyZero));
if (!fPoints[i].isFinite()) {
isFinite = false;
}
« no previous file with comments | « include/core/SkPixelRef.h ('k') | tools/tsan.supp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698