projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f3b3d0
)
Pre-cache local matrix type in shader constructor.
author
mtklein
<mtklein@chromium.org>
Mon, 1 Dec 2014 20:06:24 +0000
(12:06 -0800)
committer
Commit bot
<commit-bot@chromium.org>
Mon, 1 Dec 2014 20:06:24 +0000
(12:06 -0800)
TSAN points out we race when choosing our blitter without this.
BUG=437511
Review URL: https://codereview.chromium.org/
773563002
src/core/SkShader.cpp
patch
|
blob
|
history
diff --git
a/src/core/SkShader.cpp
b/src/core/SkShader.cpp
index
816d6fd
..
9c2fc2f
100644
(file)
--- a/
src/core/SkShader.cpp
+++ b/
src/core/SkShader.cpp
@@
-44,6
+44,8
@@
SkShader::SkShader(const SkMatrix* localMatrix) {
} else {
fLocalMatrix.reset();
}
+ // Pre-cache so future calls to fLocalMatrix.getType() are threadsafe.
+ (void)fLocalMatrix.getType();
}
SkShader::~SkShader() {