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

Unified Diff: content/browser/compositor/test/no_transport_image_transport_factory.cc

Issue 2688593002: WIP: Towards merging OffscreenCanvas and Mus code
Patch Set: Fix reflector unit test 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
Index: content/browser/compositor/test/no_transport_image_transport_factory.cc
diff --git a/content/browser/compositor/test/no_transport_image_transport_factory.cc b/content/browser/compositor/test/no_transport_image_transport_factory.cc
index 8c4d6cdfc1575fe3b405c279924cb807ab3105d9..5b8d2ce41b1b981747372726e8b3c975fa0cc6d9 100644
--- a/content/browser/compositor/test/no_transport_image_transport_factory.cc
+++ b/content/browser/compositor/test/no_transport_image_transport_factory.cc
@@ -9,6 +9,7 @@
#include "build/build_config.h"
#include "cc/output/context_provider.h"
#include "cc/surfaces/surface_manager.h"
+#include "components/display_compositor/display_compositor.h"
#include "components/display_compositor/gl_helper.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "ui/compositor/compositor.h"
@@ -17,11 +18,16 @@
namespace content {
NoTransportImageTransportFactory::NoTransportImageTransportFactory()
- : surface_manager_(new cc::SurfaceManager),
- // The context factory created here is for unit tests, thus passing in
- // true in constructor.
- context_factory_(
- new ui::InProcessContextFactory(true, surface_manager_.get())) {}
+ : display_compositor_client_binding_(this) {
+ display_compositor_ = base::MakeUnique<display_compositor::DisplayCompositor>(
+ MakeRequest(&display_compositor_ptr_),
+ display_compositor_client_binding_.CreateInterfacePtrAndBind());
+
+ // The context factory created here is for unit tests, thus passing in
+ // true in constructor.
+ context_factory_ = base::MakeUnique<ui::InProcessContextFactory>(
+ true, display_compositor_.get());
+}
NoTransportImageTransportFactory::~NoTransportImageTransportFactory() {
std::unique_ptr<display_compositor::GLHelper> lost_gl_helper =
@@ -50,4 +56,7 @@ display_compositor::GLHelper* NoTransportImageTransportFactory::GetGLHelper() {
void NoTransportImageTransportFactory::SetGpuChannelEstablishFactory(
gpu::GpuChannelEstablishFactory* factory) {}
+void NoTransportImageTransportFactory::OnSurfaceCreated(
+ const cc::SurfaceInfo& surface_info) {}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698