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

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

Issue 1900993002: Move SharedMemoryLimits out of WebGraphicsContext3DCommandBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@limits
Patch Set: move-limits: types Created 4 years, 8 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>
11 #include <stdint.h> 11 #include <stdint.h>
12 12
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/at_exit.h" 15 #include "base/at_exit.h"
16 #include "base/bind.h" 16 #include "base/bind.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "base/memory/ptr_util.h" 18 #include "base/memory/ptr_util.h"
19 #include "base/memory/ref_counted_memory.h" 19 #include "base/memory/ref_counted_memory.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 21 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
22 #include "gpu/command_buffer/client/gles2_implementation.h" 22 #include "gpu/command_buffer/client/gles2_implementation.h"
23 #include "gpu/command_buffer/client/gles2_lib.h" 23 #include "gpu/command_buffer/client/gles2_lib.h"
24 #include "gpu/command_buffer/client/shared_memory_limits.h"
24 #include "gpu/command_buffer/client/transfer_buffer.h" 25 #include "gpu/command_buffer/client/transfer_buffer.h"
25 #include "gpu/command_buffer/common/constants.h" 26 #include "gpu/command_buffer/common/constants.h"
26 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 27 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
27 #include "gpu/command_buffer/common/sync_token.h" 28 #include "gpu/command_buffer/common/sync_token.h"
28 #include "gpu/command_buffer/common/value_state.h" 29 #include "gpu/command_buffer/common/value_state.h"
29 #include "gpu/command_buffer/service/command_buffer_service.h" 30 #include "gpu/command_buffer/service/command_buffer_service.h"
30 #include "gpu/command_buffer/service/command_executor.h" 31 #include "gpu/command_buffer/service/command_executor.h"
31 #include "gpu/command_buffer/service/context_group.h" 32 #include "gpu/command_buffer/service/context_group.h"
32 #include "gpu/command_buffer/service/gl_context_virtual.h" 33 #include "gpu/command_buffer/service/gl_context_virtual.h"
33 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 34 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 gles2_implementation_.reset( 378 gles2_implementation_.reset(
378 new gles2::GLES2Implementation(gles2_helper_.get(), 379 new gles2::GLES2Implementation(gles2_helper_.get(),
379 client_share_group, 380 client_share_group,
380 transfer_buffer_.get(), 381 transfer_buffer_.get(),
381 options.bind_generates_resource, 382 options.bind_generates_resource,
382 options.lose_context_when_out_of_memory, 383 options.lose_context_when_out_of_memory,
383 support_client_side_arrays, 384 support_client_side_arrays,
384 this)); 385 this));
385 386
386 ASSERT_TRUE(gles2_implementation_->Initialize( 387 ASSERT_TRUE(gles2_implementation_->Initialize(
387 kStartTransferBufferSize, 388 kStartTransferBufferSize, kMinTransferBufferSize, kMaxTransferBufferSize,
388 kMinTransferBufferSize, 389 SharedMemoryLimits::kNoLimit))
389 kMaxTransferBufferSize, 390 << "Could not init GLES2Implementation";
390 gpu::gles2::GLES2Implementation::kNoLimit))
391 << "Could not init GLES2Implementation";
392 391
393 MakeCurrent(); 392 MakeCurrent();
394 } 393 }
395 394
396 void GLManager::SetupBaseContext() { 395 void GLManager::SetupBaseContext() {
397 if (use_count_) { 396 if (use_count_) {
398 #if defined(OS_ANDROID) 397 #if defined(OS_ANDROID)
399 base_share_group_ = new scoped_refptr<gfx::GLShareGroup>( 398 base_share_group_ = new scoped_refptr<gfx::GLShareGroup>(
400 new gfx::GLShareGroup); 399 new gfx::GLShareGroup);
401 gfx::Size size(4, 4); 400 gfx::Size size(4, 4);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 639
641 // Something went wrong, just run the callback now. 640 // Something went wrong, just run the callback now.
642 callback.Run(); 641 callback.Run();
643 } 642 }
644 643
645 bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { 644 bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) {
646 return false; 645 return false;
647 } 646 }
648 647
649 } // namespace gpu 648 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/shared_memory_limits.h ('k') | gpu/gles2_conform_support/egl/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698