| Index: src/gpu/gl/GrGLGpu.cpp
|
| diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
|
| index aff40ccc85a4627071927037b3bd48e053987f74..24639af1786d3105422497fa96998ec70e851715 100644
|
| --- a/src/gpu/gl/GrGLGpu.cpp
|
| +++ b/src/gpu/gl/GrGLGpu.cpp
|
| @@ -7,7 +7,7 @@
|
|
|
|
|
| #include "GrGLGpu.h"
|
| -#include "GrGLStencilBuffer.h"
|
| +#include "GrGLStencilAttachment.h"
|
| #include "GrGLTextureRenderTarget.h"
|
| #include "GrGpuResourcePriv.h"
|
| #include "GrPipeline.h"
|
| @@ -447,13 +447,13 @@ GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe
|
|
|
| GrRenderTarget* tgt = SkNEW_ARGS(GrGLRenderTarget, (this, desc, idDesc));
|
| if (wrapDesc.fStencilBits) {
|
| - GrGLStencilBuffer::IDDesc sbDesc;
|
| - GrGLStencilBuffer::Format format;
|
| - format.fInternalFormat = GrGLStencilBuffer::kUnknownInternalFormat;
|
| + GrGLStencilAttachment::IDDesc sbDesc;
|
| + GrGLStencilAttachment::Format format;
|
| + format.fInternalFormat = GrGLStencilAttachment::kUnknownInternalFormat;
|
| format.fPacked = false;
|
| format.fStencilBits = wrapDesc.fStencilBits;
|
| format.fTotalBits = wrapDesc.fStencilBits;
|
| - GrGLStencilBuffer* sb = SkNEW_ARGS(GrGLStencilBuffer,
|
| + GrGLStencilAttachment* sb = SkNEW_ARGS(GrGLStencilAttachment,
|
| (this,
|
| sbDesc,
|
| desc.fWidth,
|
| @@ -1108,10 +1108,10 @@ GrTexture* GrGLGpu::onCreateCompressedTexture(const GrSurfaceDesc& origDesc, boo
|
|
|
| namespace {
|
|
|
| -const GrGLuint kUnknownBitCount = GrGLStencilBuffer::kUnknownBitCount;
|
| +const GrGLuint kUnknownBitCount = GrGLStencilAttachment::kUnknownBitCount;
|
|
|
| void inline get_stencil_rb_sizes(const GrGLInterface* gl,
|
| - GrGLStencilBuffer::Format* format) {
|
| + GrGLStencilAttachment::Format* format) {
|
|
|
| // we shouldn't ever know one size and not the other
|
| SkASSERT((kUnknownBitCount == format->fStencilBits) ==
|
| @@ -1140,7 +1140,7 @@ bool GrGLGpu::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width,
|
| SkASSERT(height >= rt->height());
|
|
|
| int samples = rt->numSamples();
|
| - GrGLStencilBuffer::IDDesc sbDesc;
|
| + GrGLStencilAttachment::IDDesc sbDesc;
|
|
|
| int stencilFmtCnt = this->glCaps().stencilFormats().count();
|
| for (int i = 0; i < stencilFmtCnt; ++i) {
|
| @@ -1175,9 +1175,9 @@ bool GrGLGpu::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width,
|
| fStats.incStencilBufferCreates();
|
| // After sized formats we attempt an unsized format and take
|
| // whatever sizes GL gives us. In that case we query for the size.
|
| - GrGLStencilBuffer::Format format = sFmt;
|
| + GrGLStencilAttachment::Format format = sFmt;
|
| get_stencil_rb_sizes(this->glInterface(), &format);
|
| - SkAutoTUnref<GrGLStencilBuffer> sb(SkNEW_ARGS(GrGLStencilBuffer,
|
| + SkAutoTUnref<GrGLStencilAttachment> sb(SkNEW_ARGS(GrGLStencilAttachment,
|
| (this, sbDesc, width, height, samples, format)));
|
| if (this->attachStencilBufferToRenderTarget(sb, rt)) {
|
| fLastSuccessfulStencilFmtIdx = sIdx;
|
| @@ -1248,7 +1248,7 @@ bool GrGLGpu::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width,
|
| return false;
|
| }
|
|
|
| -bool GrGLGpu::attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTarget* rt) {
|
| +bool GrGLGpu::attachStencilBufferToRenderTarget(GrStencilAttachment* sb, GrRenderTarget* rt) {
|
| GrGLRenderTarget* glrt = static_cast<GrGLRenderTarget*>(rt);
|
|
|
| GrGLuint fbo = glrt->renderFBOID();
|
| @@ -1269,7 +1269,7 @@ bool GrGLGpu::attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTar
|
| }
|
| return true;
|
| } else {
|
| - GrGLStencilBuffer* glsb = static_cast<GrGLStencilBuffer*>(sb);
|
| + GrGLStencilAttachment* glsb = static_cast<GrGLStencilAttachment*>(sb);
|
| GrGLuint rb = glsb->renderbufferID();
|
|
|
| fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID;
|
| @@ -1629,7 +1629,7 @@ void GrGLGpu::clearStencil(GrRenderTarget* target) {
|
| void GrGLGpu::onClearStencilClip(GrRenderTarget* target, const SkIRect& rect, bool insideClip) {
|
| SkASSERT(target);
|
|
|
| - GrStencilBuffer* sb = target->renderTargetPriv().getStencilBuffer();
|
| + GrStencilAttachment* sb = target->renderTargetPriv().getStencilBuffer();
|
| // this should only be called internally when we know we have a
|
| // stencil buffer.
|
| SkASSERT(sb);
|
|
|