Index: gpu/command_buffer/client/gpu_memory_buffer_factory.cc |
diff --git a/gpu/command_buffer/client/gpu_memory_buffer_factory.cc b/gpu/command_buffer/client/gpu_memory_buffer_factory.cc |
index c0e5b9f60995db5efa330a78f3606b3c4433fd4e..57fcef728501cf9954d251526d0c2204a5bd34d4 100644 |
--- a/gpu/command_buffer/client/gpu_memory_buffer_factory.cc |
+++ b/gpu/command_buffer/client/gpu_memory_buffer_factory.cc |
@@ -7,19 +7,23 @@ |
#include "base/logging.h" |
namespace gpu { |
+namespace gles2 { |
namespace { |
GpuMemoryBuffer::Creator* g_gpu_memory_buffer_factory_ = NULL; |
} |
const GpuMemoryBuffer::Creator& GetProcessDefaultGpuMemoryBufferFactory() { |
+ DCHECK(g_gpu_memory_buffer_factory_ != NULL); |
return *g_gpu_memory_buffer_factory_; |
} |
void SetProcessDefaultGpuMemoryBufferFactory( |
const GpuMemoryBuffer::Creator& factory) { |
DCHECK(g_gpu_memory_buffer_factory_ == NULL); |
+ // TODO(kaanb): move the ownership of this memory to android_webview |
g_gpu_memory_buffer_factory_ = new GpuMemoryBuffer::Creator(factory); |
} |
+} // namespace gles2 |
} // namespace gpu |