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

Unified Diff: components/mus/surfaces/display_compositor.h

Issue 2036563002: Delete OnscreenDisplayClient and TopLevelDisplayClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: onscreendisplayclient: webview-scoped-allow-gl-for-hardwarerenderer-constructor Created 4 years, 6 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 | « components/mus/surfaces/BUILD.gn ('k') | components/mus/surfaces/display_compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/surfaces/display_compositor.h
diff --git a/components/mus/surfaces/display_compositor.h b/components/mus/surfaces/display_compositor.h
index fc54e710b9f0597f995eef0b4c0ea7fe8ffe3af2..efbf99236fff5bcd1f7fd297cbfd94474d1996ca 100644
--- a/components/mus/surfaces/display_compositor.h
+++ b/components/mus/surfaces/display_compositor.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_MUS_SURFACES_DISPLAY_COMPOSITOR_H_
#define COMPONENTS_MUS_SURFACES_DISPLAY_COMPOSITOR_H_
+#include "cc/surfaces/display_client.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_factory_client.h"
@@ -13,16 +14,19 @@
#include "components/mus/surfaces/surfaces_state.h"
#include "ui/gfx/native_widget_types.h"
-namespace mus {
+namespace cc {
+class Display;
+}
-class TopLevelDisplayClient;
+namespace mus {
// TODO(fsamuel): This should become a mojo interface for the mus-gpu split.
// TODO(fsamuel): This should not be a SurfaceFactoryClient.
// The DisplayCompositor receives CompositorFrames from all sources,
// creates a top-level CompositorFrame once per tick, and generates graphical
// output.
-class DisplayCompositor : public cc::SurfaceFactoryClient {
+class DisplayCompositor : public cc::SurfaceFactoryClient,
+ public cc::DisplayClient {
public:
DisplayCompositor(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
gfx::AcceleratedWidget widget,
@@ -56,6 +60,10 @@ class DisplayCompositor : public cc::SurfaceFactoryClient {
void ReturnResources(const cc::ReturnedResourceArray& resources) override;
void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
+ // DisplayClient implementation.
+ void DisplayOutputSurfaceLost() override;
+ void DisplaySetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override;
+
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
scoped_refptr<SurfacesState> surfaces_state_;
cc::SurfaceFactory factory_;
@@ -63,7 +71,7 @@ class DisplayCompositor : public cc::SurfaceFactoryClient {
cc::SurfaceId surface_id_;
gfx::Size display_size_;
- std::unique_ptr<TopLevelDisplayClient> display_client_;
+ std::unique_ptr<cc::Display> display_;
DISALLOW_COPY_AND_ASSIGN(DisplayCompositor);
};
« no previous file with comments | « components/mus/surfaces/BUILD.gn ('k') | components/mus/surfaces/display_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698