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

Unified Diff: gpu/vulkan/vulkan_surface.h

Issue 1776453003: Added initial implementation of Vulkan Render Passes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_vulkan
Patch Set: Adding logging/macros headers Created 4 years, 9 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/vulkan/vulkan_render_pass.cc ('k') | gpu/vulkan/vulkan_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/vulkan/vulkan_surface.h
diff --git a/gpu/vulkan/vulkan_surface.h b/gpu/vulkan/vulkan_surface.h
index 3dfb9280026390bdfd86c9276a35041454a7f13a..cb0baad43d77293aa6bfeb27c74db49def8c2160 100644
--- a/gpu/vulkan/vulkan_surface.h
+++ b/gpu/vulkan/vulkan_surface.h
@@ -5,18 +5,49 @@
#ifndef GPU_VULKAN_VULKAN_SURFACE_H_
#define GPU_VULKAN_VULKAN_SURFACE_H_
+#include "base/memory/scoped_ptr.h"
#include "gpu/vulkan/vulkan_export.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/swap_result.h"
namespace gpu {
+class VulkanSwapChain;
+
class VULKAN_EXPORT VulkanSurface {
public:
- VulkanSurface();
-
static bool InitializeOneOff();
+ // Minimum bit depth of surface.
+ enum Format {
+ FORMAT_BGRA8888,
+ FORMAT_RGB565,
+
+ NUM_SURFACE_FORMATS,
+ DEFAULT_SURFACE_FORMAT = FORMAT_BGRA8888
+ };
+
+ virtual ~VulkanSurface() = 0;
+
+ virtual bool Initialize(VulkanSurface::Format format) = 0;
+ virtual void Destroy() = 0;
+
+ virtual gfx::SwapResult SwapBuffers() = 0;
+
+ virtual VulkanSwapChain* GetSwapChain() = 0;
+
+ virtual void Finish() = 0;
+
+ // Create a surface that render directlys into a surface.
+ static scoped_ptr<VulkanSurface> CreateViewSurface(
+ gfx::AcceleratedWidget window);
+
protected:
- virtual ~VulkanSurface();
+ VulkanSurface();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VulkanSurface);
};
} // namespace gpu
« no previous file with comments | « gpu/vulkan/vulkan_render_pass.cc ('k') | gpu/vulkan/vulkan_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698