From 0d28e574ac73fef8bf75cab083ffe23f2d8860a1 Mon Sep 17 00:00:00 2001 From: csmartdalton Date: Wed, 6 Jul 2016 09:59:43 -0700 Subject: 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 --- src/gpu/gl/GrGLGpu.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gpu/gl/GrGLGpu.h') diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h index 013613ad27..c8edbb9c28 100644 --- a/src/gpu/gl/GrGLGpu.h +++ b/src/gpu/gl/GrGLGpu.h @@ -216,10 +216,8 @@ private: const SkIRect& srcRect, const SkIPoint& dstPoint) override; - void onGetMultisampleSpecs(GrRenderTarget*, - const GrStencilSettings&, - int* effectiveSampleCnt, - SkAutoTDeleteArray* sampleLocations) override; + void onGetMultisampleSpecs(GrRenderTarget*, const GrStencilSettings&, + int* effectiveSampleCnt, SamplePattern*) override; // binds texture unit in GL void setTextureUnit(int unitIdx); -- cgit v1.2.3