OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... | |
21 CreateGpuMemoryBufferCallback; | 21 CreateGpuMemoryBufferCallback; |
22 | 22 |
23 static GpuMemoryBufferFactoryHost* GetInstance(); | 23 static GpuMemoryBufferFactoryHost* GetInstance(); |
24 | 24 |
25 virtual void CreateGpuMemoryBuffer( | 25 virtual void CreateGpuMemoryBuffer( |
26 const gfx::GpuMemoryBufferHandle& handle, | 26 const gfx::GpuMemoryBufferHandle& handle, |
27 const gfx::Size& size, | 27 const gfx::Size& size, |
28 unsigned internalformat, | 28 unsigned internalformat, |
29 unsigned usage, | 29 unsigned usage, |
30 const CreateGpuMemoryBufferCallback& callback) = 0; | 30 const CreateGpuMemoryBufferCallback& callback) = 0; |
31 // This function is to be called only for images allocated from the | |
32 // browser process command buffer. Allocations originating from the renderers | |
33 // should use the async version of the function. | |
34 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferSync( | |
35 const gfx::GpuMemoryBufferHandle& handle, | |
36 const gfx::Size& size, | |
37 unsigned internalformat, | |
38 unsigned usage) = 0; | |
reveman
2014/09/04 19:43:31
Not a fan of this alternative function for doing t
piman
2014/09/04 19:59:20
We should not block the UI thread except when we r
reveman
2014/09/04 22:37:24
Agree. I guess my question was, can we make this i
| |
31 virtual void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle, | 39 virtual void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle, |
32 int32 sync_point) = 0; | 40 int32 sync_point) = 0; |
33 | 41 |
34 protected: | 42 protected: |
35 GpuMemoryBufferFactoryHost(); | 43 GpuMemoryBufferFactoryHost(); |
36 virtual ~GpuMemoryBufferFactoryHost(); | 44 virtual ~GpuMemoryBufferFactoryHost(); |
37 }; | 45 }; |
38 | 46 |
39 } // namespace content | 47 } // namespace content |
40 | 48 |
41 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_ | 49 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_ |
OLD | NEW |