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

Side by Side Diff: services/ui/public/cpp/surface_id_handler.h

Issue 2478383002: Remove SurfaceSequence from mus client code. (Closed)
Patch Set: Only cleanup. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | services/ui/public/cpp/tests/test_window_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
6 #define SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ 6 #define SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
7 7
8 #include "cc/surfaces/surface_id.h" 8 #include "cc/surfaces/surface_id.h"
9 #include "cc/surfaces/surface_sequence.h"
10 #include "ui/gfx/geometry/size.h" 9 #include "ui/gfx/geometry/size.h"
11 10
12 namespace ui { 11 namespace ui {
13 12
14 class Window; 13 class Window;
15 14
16 // Holds information about the current surface held by a Window. 15 // Holds information about the current surface held by a Window.
17 // |surface_id| uniquely identifies the surface in the display 16 // |surface_id| uniquely identifies the surface in the display
18 // compositor. 17 // compositor.
19 // |surface_sequence| is a reference to the surface to retain
20 // this surface even after a new surface has been created.
21 // |frame_size| is the size of the frame held by the surface. 18 // |frame_size| is the size of the frame held by the surface.
22 // |device_scale_factor| is the scale factor that the frame was 19 // |device_scale_factor| is the scale factor that the frame was
23 // renderered for. 20 // renderered for.
24 struct SurfaceInfo { 21 struct SurfaceInfo {
25 cc::SurfaceId surface_id; 22 cc::SurfaceId surface_id;
26 cc::SurfaceSequence surface_sequence;
27 gfx::Size frame_size; 23 gfx::Size frame_size;
28 float device_scale_factor; 24 float device_scale_factor;
29 }; 25 };
30 26
31 class SurfaceIdHandler { 27 class SurfaceIdHandler {
32 public: 28 public:
33 // Called when a child window allocates a new surface ID. 29 // Called when a child window allocates a new surface ID.
34 // If the handler wishes to retain ownership of the |surface_info|, 30 // If the handler wishes to retain ownership of the |surface_info|,
35 // it can move it. If a child's surface has been cleared then 31 // it can move it. If a child's surface has been cleared then
36 // |surface_info| will refer to a null pointer. 32 // |surface_info| will refer to a null pointer.
37 virtual void OnChildWindowSurfaceChanged( 33 virtual void OnChildWindowSurfaceChanged(
38 Window* window, 34 Window* window,
39 std::unique_ptr<SurfaceInfo>* surface_info) = 0; 35 std::unique_ptr<SurfaceInfo>* surface_info) = 0;
40 }; 36 };
41 37
42 } // namespace ui 38 } // namespace ui
43 39
44 #endif // SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ 40 #endif // SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | services/ui/public/cpp/tests/test_window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698