Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1021)

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 26695005: separate state for msaa renderability (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: bool to int Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "effects/GrTextureDomainEffect.h" 10 #include "effects/GrTextureDomainEffect.h"
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 const SkStrokeRec& stroke, 840 const SkStrokeRec& stroke,
841 bool doAA, 841 bool doAA,
842 GrAutoScratchTexture* mask) { 842 GrAutoScratchTexture* mask) {
843 GrTextureDesc desc; 843 GrTextureDesc desc;
844 desc.fFlags = kRenderTarget_GrTextureFlagBit; 844 desc.fFlags = kRenderTarget_GrTextureFlagBit;
845 desc.fWidth = SkScalarCeilToInt(maskRect.width()); 845 desc.fWidth = SkScalarCeilToInt(maskRect.width());
846 desc.fHeight = SkScalarCeilToInt(maskRect.height()); 846 desc.fHeight = SkScalarCeilToInt(maskRect.height());
847 // We actually only need A8, but it often isn't supported as a 847 // We actually only need A8, but it often isn't supported as a
848 // render target so default to RGBA_8888 848 // render target so default to RGBA_8888
849 desc.fConfig = kRGBA_8888_GrPixelConfig; 849 desc.fConfig = kRGBA_8888_GrPixelConfig;
850 if (context->isConfigRenderable(kAlpha_8_GrPixelConfig)) { 850 if (context->isConfigRenderable(kAlpha_8_GrPixelConfig, false)) {
851 desc.fConfig = kAlpha_8_GrPixelConfig; 851 desc.fConfig = kAlpha_8_GrPixelConfig;
852 } 852 }
853 853
854 mask->set(context, desc); 854 mask->set(context, desc);
855 if (NULL == mask->texture()) { 855 if (NULL == mask->texture()) {
856 return false; 856 return false;
857 } 857 }
858 858
859 GrTexture* maskTexture = mask->texture(); 859 GrTexture* maskTexture = mask->texture();
860 SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height()); 860 SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height());
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 GrTexture* texture, 1878 GrTexture* texture,
1879 bool needClear) 1879 bool needClear)
1880 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { 1880 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) {
1881 1881
1882 SkASSERT(texture && texture->asRenderTarget()); 1882 SkASSERT(texture && texture->asRenderTarget());
1883 // This constructor is called from onCreateCompatibleDevice. It has locked t he RT in the texture 1883 // This constructor is called from onCreateCompatibleDevice. It has locked t he RT in the texture
1884 // cache. We pass true for the third argument so that it will get unlocked. 1884 // cache. We pass true for the third argument so that it will get unlocked.
1885 this->initFromRenderTarget(context, texture->asRenderTarget(), true); 1885 this->initFromRenderTarget(context, texture->asRenderTarget(), true);
1886 fNeedClear = needClear; 1886 fNeedClear = needClear;
1887 } 1887 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698