| OLD | NEW |
| 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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 return false; | 1274 return false; |
| 1275 } | 1275 } |
| 1276 *internalFormat = fConfigTable[config].fFormats.fInternalFormatRenderbuffer; | 1276 *internalFormat = fConfigTable[config].fFormats.fInternalFormatRenderbuffer; |
| 1277 return true; | 1277 return true; |
| 1278 } | 1278 } |
| 1279 | 1279 |
| 1280 bool GrGLCaps::getExternalFormat(GrPixelConfig surfaceConfig, GrPixelConfig memo
ryConfig, | 1280 bool GrGLCaps::getExternalFormat(GrPixelConfig surfaceConfig, GrPixelConfig memo
ryConfig, |
| 1281 ExternalFormatUsage usage, GrGLenum* externalFo
rmat, | 1281 ExternalFormatUsage usage, GrGLenum* externalFo
rmat, |
| 1282 GrGLenum* externalType) const { | 1282 GrGLenum* externalType) const { |
| 1283 SkASSERT(externalFormat && externalType); | 1283 SkASSERT(externalFormat && externalType); |
| 1284 if (GrPixelConfigIsCompressed(memoryConfig) || GrPixelConfigIsCompressed(mem
oryConfig)) { | 1284 if (GrPixelConfigIsCompressed(memoryConfig)) { |
| 1285 return false; | 1285 return false; |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 bool surfaceIsAlphaOnly = GrPixelConfigIsAlphaOnly(surfaceConfig); | 1288 bool surfaceIsAlphaOnly = GrPixelConfigIsAlphaOnly(surfaceConfig); |
| 1289 bool memoryIsAlphaOnly = GrPixelConfigIsAlphaOnly(memoryConfig); | 1289 bool memoryIsAlphaOnly = GrPixelConfigIsAlphaOnly(memoryConfig); |
| 1290 | 1290 |
| 1291 // We don't currently support moving RGBA data into and out of ALPHA surface
s. It could be | 1291 // We don't currently support moving RGBA data into and out of ALPHA surface
s. It could be |
| 1292 // made to work in many cases using glPixelStore and what not but is not nee
ded currently. | 1292 // made to work in many cases using glPixelStore and what not but is not nee
ded currently. |
| 1293 if (surfaceIsAlphaOnly && !memoryIsAlphaOnly) { | 1293 if (surfaceIsAlphaOnly && !memoryIsAlphaOnly) { |
| 1294 return false; | 1294 return false; |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1949 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { | 1949 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { |
| 1950 if (options.fEnableInstancedRendering) { | 1950 if (options.fEnableInstancedRendering) { |
| 1951 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th
is); | 1951 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th
is); |
| 1952 #ifndef SK_BUILD_FOR_MAC | 1952 #ifndef SK_BUILD_FOR_MAC |
| 1953 // OS X doesn't seem to write correctly to floating point textures when
using | 1953 // OS X doesn't seem to write correctly to floating point textures when
using |
| 1954 // glDraw*Indirect, regardless of the underlying GPU. | 1954 // glDraw*Indirect, regardless of the underlying GPU. |
| 1955 fAvoidInstancedDrawsToFPTargets = true; | 1955 fAvoidInstancedDrawsToFPTargets = true; |
| 1956 #endif | 1956 #endif |
| 1957 } | 1957 } |
| 1958 } | 1958 } |
| OLD | NEW |