aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrRenderTarget.h
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-07-06 09:59:43 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-06 09:59:43 -0700
commit0d28e574ac73fef8bf75cab083ffe23f2d8860a1 (patch)
tree0831082f5905199c8c5deab72d63b109b960d817 /include/gpu/GrRenderTarget.h
parent01a19504c4dbd980e96b1c5b9fe8c8779432488d (diff)
Fix caching of sample locations
The original caching logic for sample locations wishfully assumed that the GPU would always use the same sample pattern for render targets that had the same number of samples. It turns out we can't rely on that. This change improves the caching logic to handle mismatched simple patterns with the same count, and adds a unit test that emulates different sample patterns observed on real hardware. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002 Committed: https://skia.googlesource.com/skia/+/09d49a3bfe2d1e652a648ce1ea0962b38d10d166 Review-Url: https://codereview.chromium.org/2111423002
Diffstat (limited to 'include/gpu/GrRenderTarget.h')
-rw-r--r--include/gpu/GrRenderTarget.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index ff75af37e8..77b04d24d3 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -163,6 +163,7 @@ protected:
SampleConfig sampleConfig, GrStencilAttachment* stencil = nullptr)
: INHERITED(gpu, desc)
, fStencilAttachment(stencil)
+ , fMultisampleSpecsID(0)
, fSampleConfig(sampleConfig)
, fLastDrawTarget(nullptr) {
fResolveRect.setLargestInverted();
@@ -184,6 +185,7 @@ private:
friend class GrRenderTargetPriv;
GrStencilAttachment* fStencilAttachment;
+ uint8_t fMultisampleSpecsID;
SampleConfig fSampleConfig;
SkIRect fResolveRect;