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

Side by Side Diff: content/renderer/render_widget_mus_connection.h

Issue 1472063007: mustash: enable GPU Compositing in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_MUS_CONNECTION_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_MUS_CONNECTION_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_MUS_CONNECTION_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_MUS_CONNECTION_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/mus/public/cpp/output_surface.h"
9 #include "components/mus/public/cpp/window.h" 10 #include "components/mus/public/cpp/window.h"
10 #include "components/mus/public/cpp/window_observer.h" 11 #include "components/mus/public/cpp/window_observer.h"
11 #include "components/mus/public/cpp/window_surface.h" 12 #include "components/mus/public/cpp/window_surface.h"
12 #include "components/mus/public/cpp/window_tree_connection.h" 13 #include "components/mus/public/cpp/window_tree_connection.h"
13 #include "components/mus/public/cpp/window_tree_delegate.h" 14 #include "components/mus/public/cpp/window_tree_delegate.h"
14 #include "mojo/public/cpp/bindings/binding.h" 15 #include "mojo/public/cpp/bindings/binding.h"
15 16
17 namespace {
18 class OutputSurface;
19 } // namespace
20
16 namespace content { 21 namespace content {
17 22
18 class RenderWidgetMusConnection : public mus::WindowTreeDelegate, 23 class RenderWidgetMusConnection : public mus::WindowTreeDelegate,
19 public mus::WindowObserver { 24 public mus::WindowObserver {
20 public: 25 public:
21 RenderWidgetMusConnection( 26 RenderWidgetMusConnection(
22 int routing_id, 27 int routing_id,
23 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request); 28 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request);
24 ~RenderWidgetMusConnection() override; 29 ~RenderWidgetMusConnection() override;
25 30
31 scoped_ptr<cc::OutputSurface> CreateOutputSurface();
32
33 static RenderWidgetMusConnection* Get(int routing_id);
34
26 private: 35 private:
27 void SubmitCompositorFrame(); 36 void SubmitCompositorFrame();
28 37
29 // WindowTreeDelegate implementation: 38 // WindowTreeDelegate implementation:
30 void OnConnectionLost(mus::WindowTreeConnection* connection) override; 39 void OnConnectionLost(mus::WindowTreeConnection* connection) override;
31 void OnEmbed(mus::Window* root) override; 40 void OnEmbed(mus::Window* root) override;
32 void OnUnembed() override; 41 void OnUnembed() override;
33 void OnWindowBoundsChanged(mus::Window* window, 42 void OnWindowBoundsChanged(mus::Window* window,
34 const gfx::Rect& old_bounds, 43 const gfx::Rect& old_bounds,
35 const gfx::Rect& new_bounds) override; 44 const gfx::Rect& new_bounds) override;
36 45
37 const int routing_id_; 46 const int routing_id_;
38 mus::Window* root_; 47 mus::Window* root_;
39 scoped_ptr<mus::WindowSurface> surface_; 48 scoped_ptr<mus::WindowSurface> surface_;
40 49
41 DISALLOW_COPY_AND_ASSIGN(RenderWidgetMusConnection); 50 DISALLOW_COPY_AND_ASSIGN(RenderWidgetMusConnection);
42 }; 51 };
43 52
44 } // namespace content 53 } // namespace content
45 54
46 #endif // CONTENT_RENDERER_RENDER_WIDGET_MUS_CONNECTION_H_ 55 #endif // CONTENT_RENDERER_RENDER_WIDGET_MUS_CONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698