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

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

Issue 1345813002: Added a unique command buffer ID for command buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed copyright Created 5 years, 3 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 <vector> 7 #include <vector>
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // We do not support more than one window surface. 109 // We do not support more than one window surface.
110 return EGL_NO_SURFACE; 110 return EGL_NO_SURFACE;
111 } 111 }
112 112
113 { 113 {
114 gpu::TransferBufferManager* manager = 114 gpu::TransferBufferManager* manager =
115 new gpu::TransferBufferManager(nullptr); 115 new gpu::TransferBufferManager(nullptr);
116 transfer_buffer_manager_ = manager; 116 transfer_buffer_manager_ = manager;
117 manager->Initialize(); 117 manager->Initialize();
118 } 118 }
119 static uint64_t command_buffer_id = 0;
119 scoped_ptr<gpu::CommandBufferService> command_buffer( 120 scoped_ptr<gpu::CommandBufferService> command_buffer(
120 new gpu::CommandBufferService(transfer_buffer_manager_.get())); 121 new gpu::CommandBufferService(transfer_buffer_manager_.get(),
122 kCommandBufferNamespace_InProcess,
123 command_buffer_id++));
121 if (!command_buffer->Initialize()) 124 if (!command_buffer->Initialize())
122 return NULL; 125 return NULL;
123 126
124 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( 127 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup(
125 NULL, NULL, new gpu::gles2::ShaderTranslatorCache, 128 NULL, NULL, new gpu::gles2::ShaderTranslatorCache,
126 new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true)); 129 new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true));
127 130
128 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); 131 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
129 if (!decoder_.get()) 132 if (!decoder_.get())
130 return EGL_NO_SURFACE; 133 return EGL_NO_SURFACE;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 void Display::SetLock(base::Lock*) { 341 void Display::SetLock(base::Lock*) {
339 NOTIMPLEMENTED(); 342 NOTIMPLEMENTED();
340 } 343 }
341 344
342 bool Display::IsGpuChannelLost() { 345 bool Display::IsGpuChannelLost() {
343 NOTIMPLEMENTED(); 346 NOTIMPLEMENTED();
344 return false; 347 return false;
345 } 348 }
346 349
347 } // namespace egl 350 } // namespace egl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698