| Index: src/gpu/gl/GrGLGpu.cpp
|
| diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
|
| index 29841331c01d308d45b7c1948db0dfe54547a4a6..ab9d699c50a4e1ff0d78c3b736ef6ec4f8da7180 100644
|
| --- a/src/gpu/gl/GrGLGpu.cpp
|
| +++ b/src/gpu/gl/GrGLGpu.cpp
|
| @@ -4138,6 +4138,39 @@ bool GrGLGpu::copySurfaceAsBlitFramebuffer(GrSurface* dst,
|
| return true;
|
| }
|
|
|
| +void GrGLGpu::onGetMultisampleSpecs(GrRenderTarget* rt,
|
| + const GrStencilSettings& stencil,
|
| + int* effectiveSampleCnt,
|
| + SkAutoTDeleteArray<SkPoint>* sampleLocations) {
|
| + SkASSERT(!rt->hasMixedSamples() || rt->renderTargetPriv().getStencilAttachment() ||
|
| + stencil.isDisabled());
|
| +
|
| + this->flushStencil(stencil);
|
| + this->flushHWAAState(rt, true, !stencil.isDisabled());
|
| + this->flushRenderTarget(static_cast<GrGLRenderTarget*>(rt), &SkIRect::EmptyIRect());
|
| +
|
| + if (0 != this->caps()->maxRasterSamples()) {
|
| + GR_GL_GetIntegerv(this->glInterface(), GR_GL_EFFECTIVE_RASTER_SAMPLES, effectiveSampleCnt);
|
| + } else {
|
| + GR_GL_GetIntegerv(this->glInterface(), GR_GL_SAMPLES, effectiveSampleCnt);
|
| + }
|
| +
|
| + SkASSERT(*effectiveSampleCnt >= rt->desc().fSampleCnt);
|
| +
|
| + if (this->caps()->sampleLocationsSupport()) {
|
| + 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()) {
|
| + (*sampleLocations)[i].set(pos[0], pos[1]);
|
| + } else {
|
| + (*sampleLocations)[i].set(pos[0], 1 - pos[1]);
|
| + }
|
| + }
|
| + }
|
| +}
|
| +
|
| void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) {
|
| SkASSERT(type);
|
| switch (type) {
|
|
|