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

Side by Side Diff: src/gpu/GrClipMaskManager.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/effects/SkBitmapAlphaThresholdShader.cpp ('k') | src/gpu/GrContext.cpp » ('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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrClipMaskManager.h" 9 #include "GrClipMaskManager.h"
10 #include "GrAAConvexPathRenderer.h" 10 #include "GrAAConvexPathRenderer.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 // There isn't a suitable entry in the cache so we create a new texture to store the mask. 399 // There isn't a suitable entry in the cache so we create a new texture to store the mask.
400 // Since we are setting up the cache we know the last lookup was a miss. Free up the 400 // Since we are setting up the cache we know the last lookup was a miss. Free up the
401 // currently cached mask so it can be reused. 401 // currently cached mask so it can be reused.
402 fAACache.reset(); 402 fAACache.reset();
403 403
404 GrTextureDesc desc; 404 GrTextureDesc desc;
405 desc.fFlags = kRenderTarget_GrTextureFlagBit; 405 desc.fFlags = kRenderTarget_GrTextureFlagBit;
406 desc.fWidth = clipSpaceIBounds.width(); 406 desc.fWidth = clipSpaceIBounds.width();
407 desc.fHeight = clipSpaceIBounds.height(); 407 desc.fHeight = clipSpaceIBounds.height();
408 desc.fConfig = kRGBA_8888_GrPixelConfig; 408 desc.fConfig = kRGBA_8888_GrPixelConfig;
409 if (this->getContext()->isConfigRenderable(kAlpha_8_GrPixelConfig)) { 409 if (this->getContext()->isConfigRenderable(kAlpha_8_GrPixelConfig, false )) {
410 // We would always like A8 but it isn't supported on all platforms 410 // We would always like A8 but it isn't supported on all platforms
411 desc.fConfig = kAlpha_8_GrPixelConfig; 411 desc.fConfig = kAlpha_8_GrPixelConfig;
412 } 412 }
413 413
414 fAACache.acquireMask(clipStackGenID, desc, clipSpaceIBounds); 414 fAACache.acquireMask(clipStackGenID, desc, clipSpaceIBounds);
415 } 415 }
416 416
417 *result = fAACache.getLastMask(); 417 *result = fAACache.getLastMask();
418 return cached; 418 return cached;
419 } 419 }
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 1030
1031 // TODO: dynamically attach a stencil buffer 1031 // TODO: dynamically attach a stencil buffer
1032 int stencilBits = 0; 1032 int stencilBits = 0;
1033 GrStencilBuffer* stencilBuffer = 1033 GrStencilBuffer* stencilBuffer =
1034 drawState.getRenderTarget()->getStencilBuffer(); 1034 drawState.getRenderTarget()->getStencilBuffer();
1035 if (NULL != stencilBuffer) { 1035 if (NULL != stencilBuffer) {
1036 stencilBits = stencilBuffer->bits(); 1036 stencilBits = stencilBuffer->bits();
1037 this->adjustStencilParams(settings, clipMode, stencilBits); 1037 this->adjustStencilParams(settings, clipMode, stencilBits);
1038 } 1038 }
1039 } 1039 }
OLDNEW
« no previous file with comments | « src/effects/SkBitmapAlphaThresholdShader.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698