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

Unified Diff: cc/surfaces/display.cc

Issue 1903523004: The display can now create a Vulkan Renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vulkan_context_surface
Patch Set: Export VulkanRenderer Created 4 years, 8 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 | « cc/output/vulkan_renderer.h ('k') | content/browser/compositor/browser_compositor_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 7c1941d0e0cb9c5af8fe3a496156f412c31401e6..9067f5f15d7b0cc7fa732d96f7a46604f18c9399 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -24,6 +24,10 @@
#include "gpu/command_buffer/client/gles2_interface.h"
#include "ui/gfx/buffer_types.h"
+#if defined(ENABLE_VULKAN)
+#include "cc/output/vulkan_renderer.h"
+#endif
+
namespace {
class EmptyBeginFrameSource : public cc::BeginFrameSource {
@@ -167,6 +171,17 @@ void Display::InitializeRenderer() {
if (!renderer)
return;
renderer_ = std::move(renderer);
+ } else if (output_surface_->vulkan_context_provider()) {
+#if defined(ENABLE_VULKAN)
+ std::unique_ptr<VulkanRenderer> renderer = VulkanRenderer::Create(
+ this, &settings_, output_surface_.get(), resource_provider.get(),
+ texture_mailbox_deleter_.get(), settings_.highp_threshold_min);
+ if (!renderer)
+ return;
+ renderer_ = std::move(renderer);
+#else
+ NOTREACHED();
+#endif
} else {
std::unique_ptr<SoftwareRenderer> renderer = SoftwareRenderer::Create(
this, &settings_, output_surface_.get(), resource_provider.get());
« no previous file with comments | « cc/output/vulkan_renderer.h ('k') | content/browser/compositor/browser_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698