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

Side by Side 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: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_VULKAN_VULKAN_SURFACE_H_ 5 #ifndef GPU_VULKAN_VULKAN_SURFACE_H_
6 #define GPU_VULKAN_VULKAN_SURFACE_H_ 6 #define GPU_VULKAN_VULKAN_SURFACE_H_
7 7
8 #include "base/memory/scoped_ptr.h"
8 #include "gpu/vulkan/vulkan_export.h" 9 #include "gpu/vulkan/vulkan_export.h"
10 #include "ui/gfx/geometry/size.h"
11 #include "ui/gfx/native_widget_types.h"
9 12
10 namespace gpu { 13 namespace gpu {
11 14
12 class VULKAN_EXPORT VulkanSurface { 15 class VULKAN_EXPORT VulkanSurface {
13 public: 16 public:
17 static bool InitializeOneOff();
18
19 // Minimum bit depth of surface.
20 enum Format {
21 SURFACE_GBRA8888,
22 SURFACE_RGB565,
23
24 NUM_SURFACE_FORMATS,
25 SURFACE_DEFAULT = SURFACE_GBRA8888
26 };
27
28 virtual bool Initialize(VulkanSurface::Format format) = 0;
29 virtual void Destroy() = 0;
30
31 virtual ~VulkanSurface();
32
33 // Create a surface that render directlys into a surface.
34 static scoped_ptr<VulkanSurface> CreateViewSurface(
35 gfx::AcceleratedWidget window);
36
37 protected:
14 VulkanSurface(); 38 VulkanSurface();
15 39
16 static bool InitializeOneOff(); 40 private:
17 41 DISALLOW_COPY_AND_ASSIGN(VulkanSurface);
18 protected:
19 virtual ~VulkanSurface();
20 }; 42 };
21 43
22 } // namespace gpu 44 } // namespace gpu
23 45
24 #endif // GPU_VULKAN_VULKAN_SURFACE_H_ 46 #endif // GPU_VULKAN_VULKAN_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698