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

Side by Side Diff: gpu/command_buffer/client/gpu_memory_buffer_factory.cc

Issue 14456004: GPU client side changes for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Add missing parameter in GLES2Implementation ctor in GLES2Implementation unittest Created 7 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/client/gpu_memory_buffer_factory.h" 5 #include "gpu/command_buffer/client/gpu_memory_buffer_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace gpu { 9 namespace gpu {
10 namespace gles2 {
10 11
11 namespace { 12 namespace {
12 GpuMemoryBuffer::Creator* g_gpu_memory_buffer_factory_ = NULL; 13 GpuMemoryBuffer::Creator* g_gpu_memory_buffer_factory_ = NULL;
13 } 14 }
14 15
15 const GpuMemoryBuffer::Creator& GetProcessDefaultGpuMemoryBufferFactory() { 16 const GpuMemoryBuffer::Creator& GetProcessDefaultGpuMemoryBufferFactory() {
17 DCHECK(g_gpu_memory_buffer_factory_ != NULL);
16 return *g_gpu_memory_buffer_factory_; 18 return *g_gpu_memory_buffer_factory_;
17 } 19 }
18 20
19 void SetProcessDefaultGpuMemoryBufferFactory( 21 void SetProcessDefaultGpuMemoryBufferFactory(
20 const GpuMemoryBuffer::Creator& factory) { 22 const GpuMemoryBuffer::Creator& factory) {
21 DCHECK(g_gpu_memory_buffer_factory_ == NULL); 23 DCHECK(g_gpu_memory_buffer_factory_ == NULL);
24 // TODO(kaanb): move the ownership of this memory to android_webview
22 g_gpu_memory_buffer_factory_ = new GpuMemoryBuffer::Creator(factory); 25 g_gpu_memory_buffer_factory_ = new GpuMemoryBuffer::Creator(factory);
23 } 26 }
24 27
28 } // namespace gles2
25 } // namespace gpu 29 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gpu_memory_buffer_factory.h ('k') | gpu/command_buffer/client/gpu_memory_buffer_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698