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

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

Issue 14456004: GPU client side changes for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Rollback decoder changes 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 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_FACTORY_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_FACTORY_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_FACTORY_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_FACTORY_H_
7 7
8 #include "gles2_impl_export.h" 8 #include "gles2_impl_export.h"
9 #include "gpu/command_buffer/client/gpu_memory_buffer.h" 9 #include "gpu/command_buffer/client/gpu_memory_buffer.h"
10 10
11 namespace gpu { 11 namespace gpu {
12 namespace gles2 {
12 13
13 // Getter and setter for a GpuMemoryBuffer factory for the current process. 14 // Getter and setter for a GpuMemoryBuffer factory for the current process.
14 // Currently it is only used for Android Webview where both browser and 15 // Currently it is only used for Android Webview where both browser and
15 // renderer are within the same process. 16 // renderer are within the same process.
16 17
17 // It is not valid to call this method before the setter is called. 18 // It is not valid to call this method before the setter is called.
18 GLES2_IMPL_EXPORT const GpuMemoryBuffer::Creator& 19 GLES2_IMPL_EXPORT const GpuMemoryBuffer::Creator&
19 GetProcessDefaultGpuMemoryBufferFactory(); 20 GetProcessDefaultGpuMemoryBufferFactory();
reveman 2013/05/08 04:23:06 This is really confusing. GpuMemoryBuffer::Creator
joth 2013/05/08 16:26:38 jamesr very specifically requested it be a Callbac
reveman 2013/05/08 20:02:41 If it's a callback, should we call it a callback a
kaanb 2013/05/08 20:41:35 How about GpuMemoryBufferCreateCallback?
reveman 2013/05/08 23:33:25 sgtm
kaanb 2013/05/09 05:13:13 I realized that to rename it I'll need to touch an
20 21
21 // It is illegal to call the setter more than once. 22 // It is illegal to call the setter more than once.
22 GLES2_IMPL_EXPORT void SetProcessDefaultGpuMemoryBufferFactory( 23 GLES2_IMPL_EXPORT void SetProcessDefaultGpuMemoryBufferFactory(
23 const GpuMemoryBuffer::Creator& factory); 24 const GpuMemoryBuffer::Creator& factory);
24 25
26 class GpuMemoryBufferFactory {
reveman 2013/05/08 04:23:06 I think this should be called ImageFactory or GLIm
kaanb 2013/05/09 05:13:13 Done.
kaanb 2013/05/09 05:13:13 Done.
27 public:
28 virtual ~GpuMemoryBufferFactory() {}
29 // Craete a GpuMemoryBuffer and makes it available to the
30 // service side by inserting it to the ImageManager.
31 virtual scoped_ptr<GpuMemoryBuffer> CreateGpuMemoryBuffer(
32 int width, int height, unsigned int* image_id) = 0;
33 };
34
35 } // namespace gles2
25 } // namespace gpu 36 } // namespace gpu
26 37
27 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_FACTORY_H_ 38 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698