aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetPriv.h
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-07-04 15:55:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-04 15:55:17 -0700
commit09d49a3bfe2d1e652a648ce1ea0962b38d10d166 (patch)
treecc7ab96fee76e22b6180bcfb9b8073dd80d020f6 /src/gpu/GrRenderTargetPriv.h
parent2b2810b4eb423cc6a368b5f8b011a3508fef7a63 (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 Review-Url: https://codereview.chromium.org/2111423002
Diffstat (limited to 'src/gpu/GrRenderTargetPriv.h')
-rw-r--r--src/gpu/GrRenderTargetPriv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpu/GrRenderTargetPriv.h b/src/gpu/GrRenderTargetPriv.h
index 52eed69a6b..db66bc3316 100644
--- a/src/gpu/GrRenderTargetPriv.h
+++ b/src/gpu/GrRenderTargetPriv.h
@@ -33,6 +33,7 @@ public:
int numStencilBits() const;
const GrGpu::MultisampleSpecs& getMultisampleSpecs(const GrStencilSettings& stencil) const;
+ uint8_t& accessMultisampleSpecsID() { return fRenderTarget->fMultisampleSpecsID; }
GrRenderTarget::SampleConfig sampleConfig() const { return fRenderTarget->fSampleConfig; }