aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-12-01 11:03:37 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-01 11:03:37 -0800
commitaf57903f330a0afd0c10244d4a66f64fdbef5d1e (patch)
treeea52add9bc80aaebd1618ace9a7ed341c1b82d78 /src/gpu
parent6e78293ee896020104ffc4c23b565073e9a49893 (diff)
Force SkMatrix type while recording too.
This switches to a new way of doing this, enforcing the caching with the type recorded rather than having to do it in SkRecorder. Should be more foolproof. Updated SkPath and SkBitmap's equivalents too. ImmutableBitmap was close, but using inheritance now makes the rest of the code less weird. BUG=437511 I'm not sure whether or not this will _fix_ the SkMatrix aspect of that bug. There may be other SkMatrices that we're racing on. It does cover the obvious ones, though, and removing the SkTRacy<> wrapper will allow TSAN to show us any other races. It turned out to be easier to turn missing optional matrices into I early rather than late. I figure this should be harmless. Recording and playback perf both look neutral. Review URL: https://codereview.chromium.org/773433003
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrRecordReplaceDraw.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrRecordReplaceDraw.cpp b/src/gpu/GrRecordReplaceDraw.cpp
index 9748f13701..3701dda36e 100644
--- a/src/gpu/GrRecordReplaceDraw.cpp
+++ b/src/gpu/GrRecordReplaceDraw.cpp
@@ -14,7 +14,7 @@
GrReplacements::ReplacementInfo* GrReplacements::newReplacement(uint32_t pictureID,
const SkMatrix& initialMat,
const int* key, int keySize) {
- ReplacementInfo* replacement = SkNEW_ARGS(ReplacementInfo, (pictureID, initialMat,
+ ReplacementInfo* replacement = SkNEW_ARGS(ReplacementInfo, (pictureID, initialMat,
key, keySize));
fReplacementHash.add(replacement);
return replacement;
@@ -134,7 +134,7 @@ public:
fOpIndexStack.push(drawPictureOffset);
- SkAutoCanvasMatrixPaint acmp(fCanvas, dp.matrix, dp.paint, dp.picture->cullRect());
+ SkAutoCanvasMatrixPaint acmp(fCanvas, &dp.matrix, dp.paint, dp.picture->cullRect());
// Draw sub-pictures with the same replacement list but a different picture
ReplaceDraw draw(fCanvas, this->drawablePicts(), this->drawableCount(),
@@ -212,8 +212,8 @@ int GrRecordReplaceDraw(const SkPicture* picture,
SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/);
// TODO: drawablePicts?
- ReplaceDraw draw(canvas, NULL, 0,
- picture, picture,
+ ReplaceDraw draw(canvas, NULL, 0,
+ picture, picture,
replacements, initialMatrix, callback, NULL, 0);
return draw.draw();