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

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

Issue 1144433002: Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
Patch Set: remove incorrect assert Created 5 years, 7 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.h ('k') | src/gpu/gl/GrGLGpu.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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #include "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 10
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 fFBFetchColorName = NULL; 935 fFBFetchColorName = NULL;
936 fFBFetchExtensionString = NULL; 936 fFBFetchExtensionString = NULL;
937 } 937 }
938 938
939 GrGLSLCaps::GrGLSLCaps(const GrGLSLCaps& caps) : GrShaderCaps() { 939 GrGLSLCaps::GrGLSLCaps(const GrGLSLCaps& caps) : GrShaderCaps() {
940 *this = caps; 940 *this = caps;
941 } 941 }
942 942
943 GrGLSLCaps& GrGLSLCaps::operator= (const GrGLSLCaps& caps) { 943 GrGLSLCaps& GrGLSLCaps::operator= (const GrGLSLCaps& caps) {
944 INHERITED::operator=(caps); 944 INHERITED::operator=(caps);
945 fGLSLGeneration = caps.fGLSLGeneration;
945 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide; 946 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide;
946 fFBFetchSupport = caps.fFBFetchSupport; 947 fFBFetchSupport = caps.fFBFetchSupport;
947 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput; 948 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput;
948 fAdvBlendEqInteraction = caps.fAdvBlendEqInteraction; 949 fAdvBlendEqInteraction = caps.fAdvBlendEqInteraction;
949 fFBFetchColorName = caps.fFBFetchColorName; 950 fFBFetchColorName = caps.fFBFetchColorName;
950 fFBFetchExtensionString = caps.fFBFetchExtensionString; 951 fFBFetchExtensionString = caps.fFBFetchExtensionString;
951 952
952 return *this; 953 return *this;
953 } 954 }
954 955
955 bool GrGLSLCaps::init(const GrGLContextInfo& ctxInfo, 956 bool GrGLSLCaps::init(const GrGLContextInfo& ctxInfo,
956 const GrGLInterface* gli, 957 const GrGLInterface* gli,
957 const GrGLCaps& glCaps) { 958 const GrGLCaps& glCaps) {
958 this->reset(); 959 this->reset();
959 if (!ctxInfo.isInitialized()) { 960 if (!ctxInfo.isInitialized()) {
960 return false; 961 return false;
961 } 962 }
962 963
964 fGLSLGeneration = ctxInfo.glslGeneration();
965
963 GrGLStandard standard = ctxInfo.standard(); 966 GrGLStandard standard = ctxInfo.standard();
964 GrGLVersion version = ctxInfo.version(); 967 GrGLVersion version = ctxInfo.version();
965 968
966 /************************************************************************** 969 /**************************************************************************
967 * Caps specific to GrGLSLCaps 970 * Caps specific to GrGLSLCaps
968 **************************************************************************/ 971 **************************************************************************/
969 972
970 if (kGLES_GrGLStandard == standard) { 973 if (kGLES_GrGLStandard == standard) {
971 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { 974 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
972 fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); 975 fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0));
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 if (fGeometryShaderSupport) { 1152 if (fGeometryShaderSupport) {
1150 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 1153 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
1151 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert ex_GrShaderType][p]; 1154 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert ex_GrShaderType][p];
1152 } 1155 }
1153 } 1156 }
1154 } 1157 }
1155 1158
1156 1159
1157 1160
1158 1161
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698