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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gpu_memory_buffer_factory.h
diff --git a/content/common/gpu/gpu_memory_buffer_factory.h b/content/common/gpu/gpu_memory_buffer_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..a750728475ee3a876b5b1aa7151b04a7616a1dbc
--- /dev/null
+++ b/content/common/gpu/gpu_memory_buffer_factory.h
@@ -0,0 +1,49 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
+#define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
+
+#include "base/memory/ref_counted.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/gpu_memory_buffer.h"
+
+namespace gfx {
+class GLImage;
+}
+
+namespace content {
+
+class GpuMemoryBufferFactory {
+ public:
+ GpuMemoryBufferFactory() {}
+ virtual ~GpuMemoryBufferFactory() {}
+
+ // Creates a new platform specific factory instance.
+ static scoped_ptr<GpuMemoryBufferFactory> Create();
+
+ // TODO: comment.
+ virtual bool CreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage) = 0;
+
+ // TODO: comment.
+ virtual void DestroyGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle) = 0;
+
+ // TODO: comment.
+ virtual scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ int client_id) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698