diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-27 20:27:44 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-27 20:27:44 +0000 |
commit | b83a1933387ec10866830d05d714252f5e5c749d (patch) | |
tree | 69a303fecde17069bfa6abf0e11c290261aff410 /src/gpu | |
parent | 194b7cdb5024719aeb7e2878f69b8f4b144aa9c4 (diff) |
Reverting r7882 (Replace A8 with RGBA8 when renderable A8 isn't supported) due Android rendering issues
git-svn-id: http://skia.googlecode.com/svn/trunk@7893 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrClipMaskManager.cpp | 6 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 15 |
2 files changed, 3 insertions, 18 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 99068c75ed..3bdb332a69 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -397,11 +397,7 @@ bool GrClipMaskManager::getMaskTexture(int32_t clipStackGenID, desc.fFlags = kRenderTarget_GrTextureFlagBit; desc.fWidth = clipSpaceIBounds.width(); desc.fHeight = clipSpaceIBounds.height(); - desc.fConfig = kRGBA_8888_GrPixelConfig; - if (this->getContext()->isConfigRenderable(kAlpha_8_GrPixelConfig)) { - // We would always like A8 but it isn't supported on all platforms - desc.fConfig = kAlpha_8_GrPixelConfig; - } + desc.fConfig = kAlpha_8_GrPixelConfig; fAACache.acquireMask(clipStackGenID, desc, clipSpaceIBounds); } diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 934f1784af..0f6fa1651c 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -425,11 +425,6 @@ GrTexture* GrContext::lockAndRefScratchTexture(const GrTextureDesc& inDesc, Scra desc.fHeight = GrMax(MIN_SIZE, GrNextPow2(desc.fHeight)); } - // Renderable A8 targets are not universally supported (e.g., not on ANGLE) - GrAssert(this->isConfigRenderable(kAlpha_8_GrPixelConfig) || - !(desc.fFlags & kRenderTarget_GrTextureFlagBit) || - (desc.fConfig != kAlpha_8_GrPixelConfig)); - GrResource* resource = NULL; int origWidth = desc.fWidth; int origHeight = desc.fHeight; @@ -1440,10 +1435,7 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target, } swapRAndB = false; // we will handle the swap in the draw. - // We protect the existing geometry here since it may not be - // clear to the caller that a draw operation (i.e., drawSimpleRect) - // can be invoked in this method - GrDrawTarget::AutoGeometryAndStatePush agasp(fGpu, GrDrawTarget::kReset_ASRInit); + GrDrawTarget::AutoStateRestore asr(fGpu, GrDrawTarget::kReset_ASRInit); GrDrawState* drawState = fGpu->drawState(); GrAssert(effect); drawState->setEffect(0, effect); @@ -1630,10 +1622,7 @@ bool GrContext::writeRenderTargetPixels(GrRenderTarget* target, return false; } - // writeRenderTargetPixels can be called in the midst of drawing another - // object (e.g., when uploading a SW path rendering to the gpu while - // drawing a rect) so preserve the current geometry. - GrDrawTarget::AutoGeometryAndStatePush agasp(fGpu, GrDrawTarget::kReset_ASRInit); + GrDrawTarget::AutoStateRestore asr(fGpu, GrDrawTarget::kReset_ASRInit); GrDrawState* drawState = fGpu->drawState(); GrAssert(effect); drawState->setEffect(0, effect); |