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

Side by Side Diff: gpu/command_buffer/service/feature_info.cc

Issue 12079065: cc: Flush after context switch (Qualcomm WAR) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snowclamp_simple
Patch Set: remove extraneous whitespace change Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 FeatureInfo::Workarounds::Workarounds() 87 FeatureInfo::Workarounds::Workarounds()
88 : clear_alpha_in_readpixels(false), 88 : clear_alpha_in_readpixels(false),
89 needs_glsl_built_in_function_emulation(false), 89 needs_glsl_built_in_function_emulation(false),
90 needs_offscreen_buffer_workaround(false), 90 needs_offscreen_buffer_workaround(false),
91 reverse_point_sprite_coord_origin(false), 91 reverse_point_sprite_coord_origin(false),
92 set_texture_filter_before_generating_mipmap(false), 92 set_texture_filter_before_generating_mipmap(false),
93 use_current_program_after_successful_link(false), 93 use_current_program_after_successful_link(false),
94 restore_scissor_on_fbo_change(false), 94 restore_scissor_on_fbo_change(false),
95 flush_on_context_switch(false),
95 max_texture_size(0), 96 max_texture_size(0),
96 max_cube_map_texture_size(0) { 97 max_cube_map_texture_size(0) {
97 } 98 }
98 99
99 FeatureInfo::FeatureInfo() { 100 FeatureInfo::FeatureInfo() {
100 static const GLenum kAlphaTypes[] = { 101 static const GLenum kAlphaTypes[] = {
101 GL_UNSIGNED_BYTE, 102 GL_UNSIGNED_BYTE,
102 }; 103 };
103 static const GLenum kRGBTypes[] = { 104 static const GLenum kRGBTypes[] = {
104 GL_UNSIGNED_BYTE, 105 GL_UNSIGNED_BYTE,
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 if (!feature_flags_.disable_workarounds) { 595 if (!feature_flags_.disable_workarounds) {
595 workarounds_.set_texture_filter_before_generating_mipmap = true; 596 workarounds_.set_texture_filter_before_generating_mipmap = true;
596 workarounds_.clear_alpha_in_readpixels = true; 597 workarounds_.clear_alpha_in_readpixels = true;
597 598
598 if (is_nvidia) { 599 if (is_nvidia) {
599 workarounds_.use_current_program_after_successful_link = true; 600 workarounds_.use_current_program_after_successful_link = true;
600 } 601 }
601 602
602 if (is_qualcomm) { 603 if (is_qualcomm) {
603 workarounds_.restore_scissor_on_fbo_change = true; 604 workarounds_.restore_scissor_on_fbo_change = true;
605 workarounds_.flush_on_context_switch = true;
604 } 606 }
605 607
606 #if defined(OS_MACOSX) 608 #if defined(OS_MACOSX)
607 workarounds_.needs_offscreen_buffer_workaround = is_nvidia; 609 workarounds_.needs_offscreen_buffer_workaround = is_nvidia;
608 workarounds_.needs_glsl_built_in_function_emulation = is_amd; 610 workarounds_.needs_glsl_built_in_function_emulation = is_amd;
609 611
610 if ((is_amd || is_intel) && 612 if ((is_amd || is_intel) &&
611 gfx::GetGLImplementation() == gfx::kGLImplementationDesktopGL) { 613 gfx::GetGLImplementation() == gfx::kGLImplementationDesktopGL) {
612 workarounds_.reverse_point_sprite_coord_origin = true; 614 workarounds_.reverse_point_sprite_coord_origin = true;
613 } 615 }
(...skipping 27 matching lines...) Expand all
641 if (extensions_.find(str) == std::string::npos) { 643 if (extensions_.find(str) == std::string::npos) {
642 extensions_ += (extensions_.empty() ? "" : " ") + str; 644 extensions_ += (extensions_.empty() ? "" : " ") + str;
643 } 645 }
644 } 646 }
645 647
646 FeatureInfo::~FeatureInfo() { 648 FeatureInfo::~FeatureInfo() {
647 } 649 }
648 650
649 } // namespace gles2 651 } // namespace gles2
650 } // namespace gpu 652 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698