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

Side by Side Diff: gpu/gles2_conform_support/egl/display.cc

Issue 1900993002: Move SharedMemoryLimits out of WebGraphicsContext3DCommandBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@limits
Patch Set: move-limits: rebase 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/gles2_conform_support/egl/display.h" 5 #include "gpu/gles2_conform_support/egl/display.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 #include "base/at_exit.h" 11 #include "base/at_exit.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
15 #include "gpu/command_buffer/client/gles2_implementation.h" 15 #include "gpu/command_buffer/client/gles2_implementation.h"
16 #include "gpu/command_buffer/client/gles2_lib.h" 16 #include "gpu/command_buffer/client/gles2_lib.h"
17 #include "gpu/command_buffer/client/shared_memory_limits.h"
17 #include "gpu/command_buffer/client/transfer_buffer.h" 18 #include "gpu/command_buffer/client/transfer_buffer.h"
18 #include "gpu/command_buffer/common/value_state.h" 19 #include "gpu/command_buffer/common/value_state.h"
19 #include "gpu/command_buffer/service/context_group.h" 20 #include "gpu/command_buffer/service/context_group.h"
20 #include "gpu/command_buffer/service/mailbox_manager.h" 21 #include "gpu/command_buffer/service/mailbox_manager.h"
21 #include "gpu/command_buffer/service/memory_tracking.h" 22 #include "gpu/command_buffer/service/memory_tracking.h"
22 #include "gpu/command_buffer/service/transfer_buffer_manager.h" 23 #include "gpu/command_buffer/service/transfer_buffer_manager.h"
23 #include "gpu/command_buffer/service/valuebuffer_manager.h" 24 #include "gpu/command_buffer/service/valuebuffer_manager.h"
24 #include "gpu/gles2_conform_support/egl/config.h" 25 #include "gpu/gles2_conform_support/egl/config.h"
25 #include "gpu/gles2_conform_support/egl/surface.h" 26 #include "gpu/gles2_conform_support/egl/surface.h"
26 #include "gpu/gles2_conform_support/egl/test_support.h" 27 #include "gpu/gles2_conform_support/egl/test_support.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 283
283 context_.reset( 284 context_.reset(
284 new gpu::gles2::GLES2Implementation(gles2_cmd_helper_.get(), 285 new gpu::gles2::GLES2Implementation(gles2_cmd_helper_.get(),
285 NULL, 286 NULL,
286 transfer_buffer_.get(), 287 transfer_buffer_.get(),
287 bind_generates_resources, 288 bind_generates_resources,
288 lose_context_when_out_of_memory, 289 lose_context_when_out_of_memory,
289 support_client_side_arrays, 290 support_client_side_arrays,
290 this)); 291 this));
291 292
292 if (!context_->Initialize( 293 if (!context_->Initialize(kTransferBufferSize, kTransferBufferSize / 2,
293 kTransferBufferSize, 294 kTransferBufferSize * 2,
294 kTransferBufferSize / 2, 295 gpu::SharedMemoryLimits::kNoLimit)) {
295 kTransferBufferSize * 2,
296 gpu::gles2::GLES2Implementation::kNoLimit)) {
297 return EGL_NO_CONTEXT; 296 return EGL_NO_CONTEXT;
298 } 297 }
299 298
300 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets"); 299 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets");
301 context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs"); 300 context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs");
302 301
303 return context_.get(); 302 return context_.get();
304 } 303 }
305 304
306 void Display::DestroyContext(EGLContext ctx) { 305 void Display::DestroyContext(EGLContext ctx) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 void Display::SignalSyncToken(const gpu::SyncToken& sync_token, 397 void Display::SignalSyncToken(const gpu::SyncToken& sync_token,
399 const base::Closure& callback) { 398 const base::Closure& callback) {
400 NOTIMPLEMENTED(); 399 NOTIMPLEMENTED();
401 } 400 }
402 401
403 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { 402 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) {
404 return false; 403 return false;
405 } 404 }
406 405
407 } // namespace egl 406 } // namespace egl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698