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

Unified Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 2061743004: Implement native GMB backbuffers in the GLES2 Command Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from piman. Created 4 years, 6 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
Index: gpu/command_buffer/tests/gl_manager.cc
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index cf07ea04123d7a67aa173ce663965fb7910705c9..8472a9b53e04b4660b244be8aadfde97c3373b28 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -185,7 +185,10 @@ GLManager::Options::Options()
context_lost_allowed(false),
context_type(gles2::CONTEXT_TYPE_OPENGLES2),
force_shader_name_hashing(false),
- multisampled(false) {}
+ multisampled(false),
+ backbuffer_alpha(true),
+ image_factory(nullptr),
+ enable_arb_texture_rectangle(false) {}
GLManager::GLManager()
: sync_point_manager_(nullptr),
@@ -287,16 +290,25 @@ void GLManager::InitializeWithCommandLine(
attribs.context_type = options.context_type;
attribs.samples = options.multisampled ? 4 : 0;
attribs.sample_buffers = options.multisampled ? 1 : 0;
+ attribs.alpha_size = options.backbuffer_alpha ? 8 : 0;
+ attribs.should_use_native_gmb_for_backbuffer =
+ options.image_factory != nullptr;
if (!context_group) {
GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line);
scoped_refptr<gles2::FeatureInfo> feature_info =
new gles2::FeatureInfo(command_line, gpu_driver_bug_workaround);
+ if (options.enable_arb_texture_rectangle) {
+ gles2::FeatureInfo::FeatureFlags& flags =
+ const_cast<gles2::FeatureInfo::FeatureFlags&>(
+ feature_info->feature_flags());
+ flags.arb_texture_rectangle = true;
+ }
context_group = new gles2::ContextGroup(
gpu_preferences_, mailbox_manager_.get(), NULL,
new gpu::gles2::ShaderTranslatorCache(gpu_preferences_),
new gpu::gles2::FramebufferCompletenessCache, feature_info,
- options.bind_generates_resource);
+ options.bind_generates_resource, options.image_factory);
}
decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group));
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.h ('k') | gpu/command_buffer/tests/gl_native_gmb_backbuffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698