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

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

Issue 2879463002: Initialize RendererSettings in ContextFactory (Closed)
Patch Set: Address comments 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
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..78537d3ada5b629bc5c5b913009dbb25eca4f9a5 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), weak_ptr_factory_(this) {
+ renderer_settings_ = ui::CreateRendererSettings(
danakj 2017/05/12 14:21:37 same with this?
Alex Z. 2017/05/12 14:37:49 Done.
+ [](gfx::BufferFormat format, gfx::BufferUsage usage) -> uint32_t {
+ // TODO(sad): http://crbug.com/675431
+ return GL_TEXTURE_2D;
+ });
+}
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

Powered by Google App Engine
This is Rietveld 408576698