Index: gpu/vulkan/vulkan_surface.h |
diff --git a/gpu/vulkan/vulkan_surface.h b/gpu/vulkan/vulkan_surface.h |
index 3dfb9280026390bdfd86c9276a35041454a7f13a..13543dea7d9643a0da62ad475f8821d0fad50997 100644 |
--- a/gpu/vulkan/vulkan_surface.h |
+++ b/gpu/vulkan/vulkan_surface.h |
@@ -5,18 +5,43 @@ |
#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 VULKAN_EXPORT VulkanSurface { |
public: |
- VulkanSurface(); |
- |
static bool InitializeOneOff(); |
+ // Minimum bit depth of surface. |
+ enum Format { |
+ SURFACE_GBRA8888, |
piman
2016/03/11 03:07:52
nit: GBRA->BGRA?
BTW, we can start with this, but
David Yen
2016/03/21 18:26:31
Done.
That's interesting about the format choice,
|
+ SURFACE_RGB565, |
+ |
+ NUM_SURFACE_FORMATS, |
+ SURFACE_DEFAULT = SURFACE_GBRA8888 |
+ }; |
+ |
+ virtual ~VulkanSurface() = 0; |
+ |
+ virtual bool Initialize(VulkanSurface::Format format) = 0; |
+ virtual void Destroy() = 0; |
+ |
+ virtual gfx::SwapResult SwapBuffers() = 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 |