Chromium Code Reviews| Index: gpu/vulkan/vulkan_surface.h |
| diff --git a/gpu/vulkan/vulkan_surface.h b/gpu/vulkan/vulkan_surface.h |
| index da6d847fa328403db3f390f9cdbfbdfa5c776e4d..0c85452146598494c844980cfd4902e6eb1de36d 100644 |
| --- a/gpu/vulkan/vulkan_surface.h |
| +++ b/gpu/vulkan/vulkan_surface.h |
| @@ -5,18 +5,46 @@ |
| #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" |
| namespace gfx { |
| class VULKAN_EXPORT VulkanSurface { |
| public: |
| - VulkanSurface(); |
| - |
| static bool InitializeOneOff(); |
| - protected: |
| + // Minimum bit depth of surface. |
| + enum Format { |
| + SURFACE_ARGB8888, |
| + SURFACE_RGB565, |
| + SURFACE_OSMESA_BGRA, |
| + SURFACE_OSMESA_RGBA, |
|
piman
2016/03/09 01:25:34
I doubt OSMesa will ever support Vulkan.
David Yen
2016/03/10 01:39:49
Done.
|
| + |
| + NUM_SURFACE_FORMATS, |
| + SURFACE_DEFAULT = SURFACE_ARGB8888 |
| + }; |
| + |
| + virtual bool Initialize(VulkanSurface::Format format) = 0; |
| + virtual void Destroy() = 0; |
| + |
| virtual ~VulkanSurface(); |
| + |
| + // Create a surface that render directlys into a surface. |
| + static scoped_ptr<gfx::VulkanSurface> CreateViewSurface( |
| + gfx::AcceleratedWidget window); |
| + |
| + // Create a surface for offscreen rendering. |
|
piman
2016/03/09 01:25:34
I don't think we want this. It was necessary in GL
David Yen
2016/03/10 01:39:49
Done.
|
| + static scoped_ptr<gfx::VulkanSurface> CreateOffscreenSurface( |
| + const gfx::Size& size); |
| + |
| + protected: |
| + VulkanSurface(); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(VulkanSurface); |
| }; |
| } // namespace gfx |