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

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

Issue 2251573002: Implement difference clip rects with window rectangles (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Implement difference clip rects with window rectangles Created 4 years, 4 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/GrWindowRectangles.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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 // We only have a use for raster multisample if there is coverage modulation from mixed samples. 455 // We only have a use for raster multisample if there is coverage modulation from mixed samples.
456 if (fUsesMixedSamples && ctxInfo.hasExtension("GL_EXT_raster_multisample")) { 456 if (fUsesMixedSamples && ctxInfo.hasExtension("GL_EXT_raster_multisample")) {
457 GR_GL_GetIntegerv(gli, GR_GL_MAX_RASTER_SAMPLES, &fMaxRasterSamples); 457 GR_GL_GetIntegerv(gli, GR_GL_MAX_RASTER_SAMPLES, &fMaxRasterSamples);
458 // This is to guard against platforms that may not support as many sampl es for 458 // This is to guard against platforms that may not support as many sampl es for
459 // glRasterSamples as they do for framebuffers. 459 // glRasterSamples as they do for framebuffers.
460 fMaxStencilSampleCount = SkTMin(fMaxStencilSampleCount, fMaxRasterSample s); 460 fMaxStencilSampleCount = SkTMin(fMaxStencilSampleCount, fMaxRasterSample s);
461 } 461 }
462 fMaxColorSampleCount = fMaxStencilSampleCount; 462 fMaxColorSampleCount = fMaxStencilSampleCount;
463 463
464 if (ctxInfo.hasExtension("GL_EXT_window_rectangles")) { 464 if (ctxInfo.hasExtension("GL_EXT_window_rectangles")) {
465 GR_GL_GetIntegerv(gli, GR_GL_MAX_WINDOW_RECTANGLES, &fMaxWindowRectangle s); 465 GR_GL_GetIntegerv(gli, GR_GL_MAX_WINDOW_RECTANGLES, &fMaxWindowRectangle s);
Mark Kilgard 2016/08/17 17:59:17 I actually think protecting yourself from a large
466 // Protect ourselves against tracking huge amounts of window rectangle s tate.
467 fMaxWindowRectangles = SkTMin(31, fMaxWindowRectangles);
468 } 466 }
469 467
470 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || 468 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() ||
471 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || 469 kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() ||
472 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { 470 kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) {
473 fUseDrawInsteadOfClear = true; 471 fUseDrawInsteadOfClear = true;
474 } 472 }
475 473
476 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) { 474 if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) {
477 fUseDrawInsteadOfPartialRenderTargetWrite = true; 475 fUseDrawInsteadOfPartialRenderTargetWrite = true;
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { 1938 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
1941 if (options.fEnableInstancedRendering) { 1939 if (options.fEnableInstancedRendering) {
1942 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th is); 1940 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th is);
1943 #ifndef SK_BUILD_FOR_MAC 1941 #ifndef SK_BUILD_FOR_MAC
1944 // OS X doesn't seem to write correctly to floating point textures when using 1942 // OS X doesn't seem to write correctly to floating point textures when using
1945 // glDraw*Indirect, regardless of the underlying GPU. 1943 // glDraw*Indirect, regardless of the underlying GPU.
1946 fAvoidInstancedDrawsToFPTargets = true; 1944 fAvoidInstancedDrawsToFPTargets = true;
1947 #endif 1945 #endif
1948 } 1946 }
1949 } 1947 }
OLDNEW
« no previous file with comments | « src/gpu/GrWindowRectangles.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698