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

Side by Side Diff: content/common/gpu/gpu_memory_buffer_factory.h

Issue 331723003: gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wip Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "ui/gfx/geometry/size.h"
10 #include "ui/gfx/gpu_memory_buffer.h"
11
12 namespace gfx {
13 class GLImage;
14 }
15
16 namespace content {
17
18 class GpuMemoryBufferFactory {
19 public:
20 GpuMemoryBufferFactory() {}
21 virtual ~GpuMemoryBufferFactory() {}
22
23 // Creates a new platform specific factory instance.
24 static scoped_ptr<GpuMemoryBufferFactory> Create();
25
26 // TODO: comment.
27 virtual bool CreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
28 const gfx::Size& size,
29 unsigned internalformat,
30 unsigned usage) = 0;
31
32 // TODO: comment.
33 virtual void DestroyGpuMemoryBuffer(
34 const gfx::GpuMemoryBufferHandle& handle) = 0;
35
36 // TODO: comment.
37 virtual scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer(
38 const gfx::GpuMemoryBufferHandle& handle,
39 const gfx::Size& size,
40 unsigned internalformat,
41 int client_id) = 0;
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory);
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698