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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 207443007: Blacklist partial swaps on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gl_surface_mock.h ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index d6f9fc89a47a18c7c4da25353db9f757a122e3c8..736854e2f6e2069968a7b40382f67a2952fcac0f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1702,6 +1702,7 @@ class GLES2DecoderImpl : public GLES2Decoder,
bool has_robustness_extension_;
GLenum reset_status_;
bool reset_by_robustness_extension_;
+ bool supports_post_sub_buffer_;
// These flags are used to override the state of the shared feature_info_
// member. Because the same FeatureInfo instance may be shared among many
@@ -2207,6 +2208,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group)
has_robustness_extension_(false),
reset_status_(GL_NO_ERROR),
reset_by_robustness_extension_(false),
+ supports_post_sub_buffer_(false),
force_webgl_glsl_validation_(false),
derivatives_explicitly_enabled_(false),
frag_depth_explicitly_enabled_(false),
@@ -2567,6 +2569,12 @@ bool GLES2DecoderImpl::Initialize(
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
+ supports_post_sub_buffer_ = surface->SupportsPostSubBuffer();
+ if (feature_info_->workarounds()
+ .disable_post_sub_buffers_for_onscreen_surfaces &&
+ !surface->IsOffscreen())
+ supports_post_sub_buffer_ = false;
+
if (feature_info_->workarounds().reverse_point_sprite_coord_origin) {
glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
}
@@ -2619,7 +2627,7 @@ Capabilities GLES2DecoderImpl::GetCapabilities() {
caps.iosurface = true;
#endif
- caps.post_sub_buffer = surface_->HasExtension("GL_CHROMIUM_post_sub_buffer");
+ caps.post_sub_buffer = supports_post_sub_buffer_;
return caps;
}
@@ -7433,7 +7441,7 @@ error::Error GLES2DecoderImpl::HandlePixelStorei(
error::Error GLES2DecoderImpl::HandlePostSubBufferCHROMIUM(
uint32 immediate_data_size, const cmds::PostSubBufferCHROMIUM& c) {
TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandlePostSubBufferCHROMIUM");
- if (!surface_->HasExtension("GL_CHROMIUM_post_sub_buffer")) {
+ if (!supports_post_sub_buffer_) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION,
"glPostSubBufferCHROMIUM", "command not supported by surface");
@@ -7627,9 +7635,8 @@ error::Error GLES2DecoderImpl::HandleGetString(
} else {
extensions = feature_info_->extensions().c_str();
}
- std::string surface_extensions = surface_->GetExtensions();
- if (!surface_extensions.empty())
- extensions += " " + surface_extensions;
+ if (supports_post_sub_buffer_)
+ extensions += " GL_CHROMIUM_post_sub_buffer";
str = extensions.c_str();
}
break;
« no previous file with comments | « gpu/command_buffer/service/gl_surface_mock.h ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698