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

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2062443002: Move multisampleDisableSupport into GrCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | 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 "GrGLGpu.h" 8 #include "GrGLGpu.h"
9 #include "GrGLBuffer.h" 9 #include "GrGLBuffer.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 2973 matching lines...) Expand 10 before | Expand all | Expand 10 after
2984 } 2984 }
2985 fHWStencilSettings = stencilSettings; 2985 fHWStencilSettings = stencilSettings;
2986 } 2986 }
2987 } 2987 }
2988 2988
2989 void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabl ed) { 2989 void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabl ed) {
2990 // rt is only optional if useHWAA is false. 2990 // rt is only optional if useHWAA is false.
2991 SkASSERT(rt || !useHWAA); 2991 SkASSERT(rt || !useHWAA);
2992 SkASSERT(!useHWAA || rt->isStencilBufferMultisampled()); 2992 SkASSERT(!useHWAA || rt->isStencilBufferMultisampled());
2993 2993
2994 if (this->glCaps().multisampleDisableSupport()) { 2994 if (this->caps()->multisampleDisableSupport()) {
2995 if (useHWAA) { 2995 if (useHWAA) {
2996 if (kYes_TriState != fMSAAEnabled) { 2996 if (kYes_TriState != fMSAAEnabled) {
2997 GL_CALL(Enable(GR_GL_MULTISAMPLE)); 2997 GL_CALL(Enable(GR_GL_MULTISAMPLE));
2998 fMSAAEnabled = kYes_TriState; 2998 fMSAAEnabled = kYes_TriState;
2999 } 2999 }
3000 } else { 3000 } else {
3001 if (kNo_TriState != fMSAAEnabled) { 3001 if (kNo_TriState != fMSAAEnabled) {
3002 GL_CALL(Disable(GR_GL_MULTISAMPLE)); 3002 GL_CALL(Disable(GR_GL_MULTISAMPLE));
3003 fMSAAEnabled = kNo_TriState; 3003 fMSAAEnabled = kNo_TriState;
3004 } 3004 }
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
4645 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4645 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4646 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4646 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4647 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4647 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4648 copyParams->fWidth = texture->width(); 4648 copyParams->fWidth = texture->width();
4649 copyParams->fHeight = texture->height(); 4649 copyParams->fHeight = texture->height();
4650 return true; 4650 return true;
4651 } 4651 }
4652 } 4652 }
4653 return false; 4653 return false;
4654 } 4654 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698