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

Unified Diff: ui/aura/mus/mus_context_factory.cc

Issue 2879463002: Initialize RendererSettings in ContextFactory (Closed)
Patch Set: const RendererSettings Created 3 years, 7 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 | « ui/aura/mus/mus_context_factory.h ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/mus_context_factory.cc
diff --git a/ui/aura/mus/mus_context_factory.cc b/ui/aura/mus/mus_context_factory.cc
index 9517875318f35ee39d05ef00313a8b7970cf1c18..71698063c0639e72494947b2103a2a4bd99dbcfc 100644
--- a/ui/aura/mus/mus_context_factory.cc
+++ b/ui/aura/mus/mus_context_factory.cc
@@ -4,16 +4,28 @@
#include "ui/aura/mus/mus_context_factory.h"
+#include "base/command_line.h"
#include "base/memory/ptr_util.h"
+#include "cc/base/switches.h"
#include "services/ui/public/cpp/gpu/gpu.h"
#include "ui/aura/mus/window_port_mus.h"
#include "ui/aura/window_tree_host.h"
+#include "ui/compositor/compositor_switches.h"
+#include "ui/compositor/compositor_util.h"
+#include "ui/display/display_switches.h"
+#include "ui/gfx/switches.h"
#include "ui/gl/gl_bindings.h"
namespace aura {
MusContextFactory::MusContextFactory(ui::Gpu* gpu)
- : gpu_(gpu), weak_ptr_factory_(this) {}
+ : gpu_(gpu),
+ renderer_settings_(ui::CreateRendererSettings(
+ [](gfx::BufferFormat format, gfx::BufferUsage usage) -> uint32_t {
+ // TODO(sad): http://crbug.com/675431
+ return GL_TEXTURE_2D;
+ })),
+ weak_ptr_factory_(this) {}
MusContextFactory::~MusContextFactory() {}
@@ -62,12 +74,6 @@ double MusContextFactory::GetRefreshRate() const {
return 60.0;
}
-uint32_t MusContextFactory::GetImageTextureTarget(gfx::BufferFormat format,
- gfx::BufferUsage usage) {
- // TODO(sad): http://crbug.com/675431
- return GL_TEXTURE_2D;
-}
-
gpu::GpuMemoryBufferManager* MusContextFactory::GetGpuMemoryBufferManager() {
return gpu_->gpu_memory_buffer_manager();
}
@@ -76,4 +82,8 @@ cc::TaskGraphRunner* MusContextFactory::GetTaskGraphRunner() {
return raster_thread_helper_.task_graph_runner();
}
+const cc::RendererSettings& MusContextFactory::GetRendererSettings() const {
+ return renderer_settings_;
+}
+
} // namespace aura
« no previous file with comments | « ui/aura/mus/mus_context_factory.h ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698