Index: src/gpu/gl/GrGLGpu.cpp |
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp |
index 99726904873a4f5df4b5feecaa909fc68d2a5fb9..2fb66804e007b78e3f1ecc2888c1fe4cc46a3053 100644 |
--- a/src/gpu/gl/GrGLGpu.cpp |
+++ b/src/gpu/gl/GrGLGpu.cpp |
@@ -4432,8 +4432,10 @@ |
return true; |
} |
-void GrGLGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings& stencil, |
- int* effectiveSampleCnt, SamplePattern* samplePattern) { |
+void GrGLGpu::onGetMultisampleSpecs(GrRenderTarget* rt, |
+ const GrStencilSettings& stencil, |
+ int* effectiveSampleCnt, |
+ SkAutoTDeleteArray<SkPoint>* sampleLocations) { |
SkASSERT(!rt->hasMixedSamples() || rt->renderTargetPriv().getStencilAttachment() || |
stencil.isDisabled()); |
@@ -4450,14 +4452,14 @@ |
SkASSERT(*effectiveSampleCnt >= rt->desc().fSampleCnt); |
if (this->caps()->sampleLocationsSupport()) { |
- samplePattern->reset(*effectiveSampleCnt); |
+ sampleLocations->reset(new SkPoint[*effectiveSampleCnt]); |
for (int i = 0; i < *effectiveSampleCnt; ++i) { |
GrGLfloat pos[2]; |
GL_CALL(GetMultisamplefv(GR_GL_SAMPLE_POSITION, i, pos)); |
if (kTopLeft_GrSurfaceOrigin == rt->origin()) { |
- (*samplePattern)[i].set(pos[0], pos[1]); |
+ (*sampleLocations)[i].set(pos[0], pos[1]); |
} else { |
- (*samplePattern)[i].set(pos[0], 1 - pos[1]); |
+ (*sampleLocations)[i].set(pos[0], 1 - pos[1]); |
} |
} |
} |