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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_factory_host.h

Issue 458313002: Browser side OZONE_NATIVE_BUFFER allocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 6 years, 4 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 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 10
10 namespace gfx { 11 namespace gfx {
11 class Size; 12 class Size;
12 struct GpuMemoryBufferHandle; 13 struct GpuMemoryBufferHandle;
13 } 14 }
14 15
15 namespace content { 16 namespace content {
16 17
17 class CONTENT_EXPORT GpuMemoryBufferFactoryHost { 18 class CONTENT_EXPORT GpuMemoryBufferFactoryHost {
18 public: 19 public:
19 typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)> 20 typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
20 CreateGpuMemoryBufferCallback; 21 CreateGpuMemoryBufferCallback;
21 22
22 virtual void CreateGpuMemoryBuffer( 23 virtual void CreateGpuMemoryBuffer(
23 const gfx::GpuMemoryBufferHandle& handle, 24 const gfx::GpuMemoryBufferHandle& handle,
24 const gfx::Size& size, 25 const gfx::Size& size,
25 unsigned internalformat, 26 unsigned internalformat,
26 unsigned usage, 27 unsigned usage,
27 const CreateGpuMemoryBufferCallback& callback) = 0; 28 const CreateGpuMemoryBufferCallback& callback) = 0;
28 virtual void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle, 29 virtual void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
29 int32 sync_point) = 0; 30 int32 sync_point) = 0;
30 31
32 static GpuMemoryBufferFactoryHost* GetInstance();
reveman 2014/08/13 17:00:25 nit: I'd move this static method above all virtual
reveman 2014/08/13 17:00:25 Don't we need a InitInstance or SetInstance too? a
achaulk 2014/08/13 17:10:12 Forgot to add the new file. I'm currently just doi
33
31 protected: 34 protected:
32 virtual ~GpuMemoryBufferFactoryHost() {} 35 GpuMemoryBufferFactoryHost();
36 virtual ~GpuMemoryBufferFactoryHost();
reveman 2014/08/13 17:00:26 hm, why do you need to change this?
33 }; 37 };
34 38
35 } // namespace content 39 } // namespace content
36 40
37 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_ 41 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698