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

Unified Diff: mash/test/mash_test_suite.cc

Issue 2714393002: ash: Low-latency laser pointer. (Closed)
Patch Set: remove :surfaces Created 3 years, 10 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 | « mash/test/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/test/mash_test_suite.cc
diff --git a/mash/test/mash_test_suite.cc b/mash/test/mash_test_suite.cc
index 51210a0cd0be9dde4e2cf591c9f5c556860ceabf..306ec66ac8b793c3485c667ab9f4893621addf3f 100644
--- a/mash/test/mash_test_suite.cc
+++ b/mash/test/mash_test_suite.cc
@@ -9,12 +9,15 @@
#include "base/memory/ptr_util.h"
#include "base/path_service.h"
#include "cc/output/context_provider.h"
+#include "cc/surfaces/frame_sink_id_allocator.h"
+#include "cc/surfaces/surface_manager.h"
#include "cc/test/test_gpu_memory_buffer_manager.h"
#include "cc/test/test_task_graph_runner.h"
#include "ui/aura/env.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/compositor/compositor.h"
+#include "ui/compositor/reflector.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_switches.h"
#include "ui/gl/test/gl_surface_test_support.h"
@@ -22,9 +25,10 @@
namespace mash {
namespace test {
-class TestContextFactory : public ui::ContextFactory {
+class TestContextFactory : public ui::ContextFactory,
+ public ui::ContextFactoryPrivate {
public:
- TestContextFactory() {}
+ TestContextFactory() : frame_sink_id_allocator_(0) {}
~TestContextFactory() override {}
private:
@@ -50,8 +54,33 @@ class TestContextFactory : public ui::ContextFactory {
void AddObserver(ui::ContextFactoryObserver* observer) override {}
void RemoveObserver(ui::ContextFactoryObserver* observer) override {}
+ // ui::ContextFactoryPrivate:
+ std::unique_ptr<ui::Reflector> CreateReflector(
+ ui::Compositor* mirrored_compositor,
+ ui::Layer* mirroring_layer) override {
+ return nullptr;
+ }
+ void RemoveReflector(ui::Reflector* reflector) override {}
+ cc::FrameSinkId AllocateFrameSinkId() override {
+ return frame_sink_id_allocator_.NextFrameSinkId();
+ }
+ cc::SurfaceManager* GetSurfaceManager() override { return &surface_manager_; }
+ void SetDisplayVisible(ui::Compositor* compositor, bool visible) override {}
+ void ResizeDisplay(ui::Compositor* compositor,
+ const gfx::Size& size) override {}
+ void SetDisplayColorSpace(ui::Compositor* compositor,
+ const gfx::ColorSpace& color_space) override {}
+ void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
+ base::TimeDelta interval) override {}
+ void SetDisplayVSyncParameters(ui::Compositor* compositor,
+ base::TimeTicks timebase,
+ base::TimeDelta interval) override {}
+ void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {}
+
cc::TestTaskGraphRunner task_graph_runner_;
cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
+ cc::FrameSinkIdAllocator frame_sink_id_allocator_;
+ cc::SurfaceManager surface_manager_;
DISALLOW_COPY_AND_ASSIGN(TestContextFactory);
};
@@ -78,6 +107,7 @@ void MashTestSuite::Initialize() {
compositor_context_factory_ = base::MakeUnique<TestContextFactory>();
env_->set_context_factory(compositor_context_factory_.get());
+ env_->set_context_factory_private(compositor_context_factory_.get());
}
void MashTestSuite::Shutdown() {
« no previous file with comments | « mash/test/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698