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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 } | 455 } |
456 // We only have a use for raster multisample if there is coverage modulation
from mixed samples. | 456 // We only have a use for raster multisample if there is coverage modulation
from mixed samples. |
457 if (fUsesMixedSamples && ctxInfo.hasExtension("GL_EXT_raster_multisample"))
{ | 457 if (fUsesMixedSamples && ctxInfo.hasExtension("GL_EXT_raster_multisample"))
{ |
458 GR_GL_GetIntegerv(gli, GR_GL_MAX_RASTER_SAMPLES, &fMaxRasterSamples); | 458 GR_GL_GetIntegerv(gli, GR_GL_MAX_RASTER_SAMPLES, &fMaxRasterSamples); |
459 // This is to guard against platforms that may not support as many sampl
es for | 459 // This is to guard against platforms that may not support as many sampl
es for |
460 // glRasterSamples as they do for framebuffers. | 460 // glRasterSamples as they do for framebuffers. |
461 fMaxStencilSampleCount = SkTMin(fMaxStencilSampleCount, fMaxRasterSample
s); | 461 fMaxStencilSampleCount = SkTMin(fMaxStencilSampleCount, fMaxRasterSample
s); |
462 } | 462 } |
463 fMaxColorSampleCount = fMaxStencilSampleCount; | 463 fMaxColorSampleCount = fMaxStencilSampleCount; |
464 | 464 |
| 465 if (ctxInfo.hasExtension("GL_EXT_window_rectangles")) { |
| 466 GR_GL_GetIntegerv(gli, GR_GL_MAX_WINDOW_RECTANGLES, &fMaxWindowRectangle
s); |
| 467 // Protect ourselves against tracking huge amounts of window rectangle s
tate. |
| 468 fMaxWindowRectangles = SkTMin(31, fMaxWindowRectangles); |
| 469 } |
| 470 |
465 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || | 471 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || |
466 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || | 472 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || |
467 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { | 473 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { |
468 fUseDrawInsteadOfClear = true; | 474 fUseDrawInsteadOfClear = true; |
469 } | 475 } |
470 | 476 |
471 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) { | 477 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) { |
472 fUseDrawInsteadOfPartialRenderTargetWrite = true; | 478 fUseDrawInsteadOfPartialRenderTargetWrite = true; |
473 } | 479 } |
474 | 480 |
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1935 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { | 1941 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { |
1936 if (options.fEnableInstancedRendering) { | 1942 if (options.fEnableInstancedRendering) { |
1937 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th
is); | 1943 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th
is); |
1938 #ifndef SK_BUILD_FOR_MAC | 1944 #ifndef SK_BUILD_FOR_MAC |
1939 // OS X doesn't seem to write correctly to floating point textures when
using | 1945 // OS X doesn't seem to write correctly to floating point textures when
using |
1940 // glDraw*Indirect, regardless of the underlying GPU. | 1946 // glDraw*Indirect, regardless of the underlying GPU. |
1941 fAvoidInstancedDrawsToFPTargets = true; | 1947 fAvoidInstancedDrawsToFPTargets = true; |
1942 #endif | 1948 #endif |
1943 } | 1949 } |
1944 } | 1950 } |
OLD | NEW |