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

Side by Side Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 2015693002: gpu: Fix a bug in the new ReturnFrontBuffer() path for pepper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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/tests/gl_manager.h" 5 #include "gpu/command_buffer/tests/gl_manager.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 #include <GLES2/gl2extchromium.h> 9 #include <GLES2/gl2extchromium.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 GLManager::Options::Options() 178 GLManager::Options::Options()
179 : size(4, 4), 179 : size(4, 4),
180 sync_point_manager(NULL), 180 sync_point_manager(NULL),
181 share_group_manager(NULL), 181 share_group_manager(NULL),
182 share_mailbox_manager(NULL), 182 share_mailbox_manager(NULL),
183 virtual_manager(NULL), 183 virtual_manager(NULL),
184 bind_generates_resource(false), 184 bind_generates_resource(false),
185 lose_context_when_out_of_memory(false), 185 lose_context_when_out_of_memory(false),
186 context_lost_allowed(false), 186 context_lost_allowed(false),
187 context_type(gles2::CONTEXT_TYPE_OPENGLES2), 187 context_type(gles2::CONTEXT_TYPE_OPENGLES2),
188 force_shader_name_hashing(false) {} 188 force_shader_name_hashing(false),
189 multisampled(false) {}
189 190
190 GLManager::GLManager() 191 GLManager::GLManager()
191 : sync_point_manager_(nullptr), 192 : sync_point_manager_(nullptr),
192 context_lost_allowed_(false), 193 context_lost_allowed_(false),
193 pause_commands_(false), 194 pause_commands_(false),
194 paused_order_num_(0), 195 paused_order_num_(0),
195 command_buffer_id_( 196 command_buffer_id_(
196 CommandBufferId::FromUnsafeValue(g_next_command_buffer_id++)), 197 CommandBufferId::FromUnsafeValue(g_next_command_buffer_id++)),
197 next_fence_sync_release_(1) { 198 next_fence_sync_release_(1) {
198 SetupBaseContext(); 199 SetupBaseContext();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 280
280 gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu); 281 gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu);
281 gles2::ContextCreationAttribHelper attribs; 282 gles2::ContextCreationAttribHelper attribs;
282 attribs.red_size = 8; 283 attribs.red_size = 8;
283 attribs.green_size = 8; 284 attribs.green_size = 8;
284 attribs.blue_size = 8; 285 attribs.blue_size = 8;
285 attribs.alpha_size = 8; 286 attribs.alpha_size = 8;
286 attribs.depth_size = 16; 287 attribs.depth_size = 16;
287 attribs.stencil_size = 8; 288 attribs.stencil_size = 8;
288 attribs.context_type = options.context_type; 289 attribs.context_type = options.context_type;
290 attribs.samples = options.multisampled ? 4 : 0;
291 attribs.sample_buffers = options.multisampled ? 1 : 0;
289 292
290 if (!context_group) { 293 if (!context_group) {
291 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); 294 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line);
292 scoped_refptr<gles2::FeatureInfo> feature_info = 295 scoped_refptr<gles2::FeatureInfo> feature_info =
293 new gles2::FeatureInfo(command_line, gpu_driver_bug_workaround); 296 new gles2::FeatureInfo(command_line, gpu_driver_bug_workaround);
294 context_group = new gles2::ContextGroup( 297 context_group = new gles2::ContextGroup(
295 gpu_preferences_, mailbox_manager_.get(), NULL, 298 gpu_preferences_, mailbox_manager_.get(), NULL,
296 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_), 299 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_),
297 new gpu::gles2::FramebufferCompletenessCache, feature_info, 300 new gpu::gles2::FramebufferCompletenessCache, feature_info,
298 options.bind_generates_resource); 301 options.bind_generates_resource);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 626
624 // Something went wrong, just run the callback now. 627 // Something went wrong, just run the callback now.
625 callback.Run(); 628 callback.Run();
626 } 629 }
627 630
628 bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { 631 bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) {
629 return false; 632 return false;
630 } 633 }
631 634
632 } // namespace gpu 635 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.h ('k') | gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698