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

Unified Diff: gpu/ipc/service/gpu_memory_buffer_factory_win.h

Issue 2970353002: Add GpuMemoryBuffer support for DXGI handles.
Patch Set: update build config Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/service/gpu_memory_buffer_factory.cc ('k') | gpu/ipc/service/gpu_memory_buffer_factory_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_memory_buffer_factory_win.h
diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_win.h b/gpu/ipc/service/gpu_memory_buffer_factory_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..18460c792d29bcc63f31fa2d84f0aeb951f8ce1f
--- /dev/null
+++ b/gpu/ipc/service/gpu_memory_buffer_factory_win.h
@@ -0,0 +1,53 @@
+// Copyright 2017 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 GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_WIN_H_
+#define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_WIN_H_
+
+#include "gpu/command_buffer/service/image_factory.h"
+#include "gpu/ipc/service/gpu_memory_buffer_factory.h"
+#include "ui/gl/gl_image.h"
+
+namespace gpu {
+
+class GPU_EXPORT GpuMemoryBufferFactoryWin : public GpuMemoryBufferFactory,
+ public ImageFactory {
+ public:
+ GpuMemoryBufferFactoryWin();
+ ~GpuMemoryBufferFactoryWin() override;
+
+ // Overridden from GpuMemoryBufferFactory:
+ gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
+ gfx::GpuMemoryBufferId id,
+ const gfx::Size& size,
+ gfx::BufferFormat format,
+ gfx::BufferUsage usage,
+ int client_id,
+ SurfaceHandle surface_handle) override;
+ void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
+ int client_id) override;
+ ImageFactory* AsImageFactory() override;
+
+ // Overridden from ImageFactory:
+ scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ gfx::BufferFormat format,
+ unsigned internalformat,
+ int client_id,
+ SurfaceHandle surface_handle) override;
+ scoped_refptr<gl::GLImage> CreateAnonymousImage(
+ const gfx::Size& size,
+ gfx::BufferFormat format,
+ unsigned internalformat) override;
+ unsigned RequiredTextureType() override;
+ bool SupportsFormatRGB() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryWin);
+};
+
+} // namespace gpu
+
+#endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_WIN_H_
« no previous file with comments | « gpu/ipc/service/gpu_memory_buffer_factory.cc ('k') | gpu/ipc/service/gpu_memory_buffer_factory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698