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

Side by Side Diff: services/ui/ws/platform_display.h

Issue 2281583003: services/ui: Split GpuServiceInternal into gpu vs. ws pieces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DONE_2016.08.24_mus-ws-gpu-refactor
Patch Set: tot merge Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/mus_gpu_memory_buffer_manager.cc ('k') | services/ui/ws/platform_display.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WS_PLATFORM_DISPLAY_H_ 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_H_
6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 15 matching lines...) Expand all
26 #include "ui/platform_window/platform_window_delegate.h" 26 #include "ui/platform_window/platform_window_delegate.h"
27 27
28 namespace cc { 28 namespace cc {
29 class CopyOutputRequest; 29 class CopyOutputRequest;
30 } // namespace cc 30 } // namespace cc
31 31
32 namespace gfx { 32 namespace gfx {
33 class Rect; 33 class Rect;
34 } 34 }
35 35
36 namespace gpu {
37 class GpuChannelHost;
38 }
39
36 namespace ui { 40 namespace ui {
37 class CursorLoader; 41 class CursorLoader;
38 class PlatformWindow; 42 class PlatformWindow;
39 struct TextInputState; 43 struct TextInputState;
40 } // namespace ui 44 } // namespace ui
41 45
42 namespace ui { 46 namespace ui {
43 47
44 class FrameGenerator; 48 class FrameGenerator;
45 49
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Returns true if a compositor frame has been submitted but not drawn yet. 89 // Returns true if a compositor frame has been submitted but not drawn yet.
86 virtual bool IsFramePending() const = 0; 90 virtual bool IsFramePending() const = 0;
87 91
88 virtual void RequestCopyOfOutput( 92 virtual void RequestCopyOfOutput(
89 std::unique_ptr<cc::CopyOutputRequest> output_request) = 0; 93 std::unique_ptr<cc::CopyOutputRequest> output_request) = 0;
90 94
91 virtual gfx::Rect GetBounds() const = 0; 95 virtual gfx::Rect GetBounds() const = 0;
92 96
93 virtual bool IsPrimaryDisplay() const = 0; 97 virtual bool IsPrimaryDisplay() const = 0;
94 98
99 // Notifies the PlatformDisplay that a connection to the gpu has been
100 // established.
101 virtual void OnGpuChannelEstablished(
102 scoped_refptr<gpu::GpuChannelHost> gpu_channel) = 0;
103
95 // Overrides factory for testing. Default (NULL) value indicates regular 104 // Overrides factory for testing. Default (NULL) value indicates regular
96 // (non-test) environment. 105 // (non-test) environment.
97 static void set_factory_for_testing(PlatformDisplayFactory* factory) { 106 static void set_factory_for_testing(PlatformDisplayFactory* factory) {
98 PlatformDisplay::factory_ = factory; 107 PlatformDisplay::factory_ = factory;
99 } 108 }
100 109
101 private: 110 private:
102 // Static factory instance (always NULL for non-test). 111 // Static factory instance (always NULL for non-test).
103 static PlatformDisplayFactory* factory_; 112 static PlatformDisplayFactory* factory_;
104 }; 113 };
(...skipping 19 matching lines...) Expand all
124 void SetCursorById(int32_t cursor) override; 133 void SetCursorById(int32_t cursor) override;
125 float GetDeviceScaleFactor() override; 134 float GetDeviceScaleFactor() override;
126 display::Display::Rotation GetRotation() override; 135 display::Display::Rotation GetRotation() override;
127 void UpdateTextInputState(const ui::TextInputState& state) override; 136 void UpdateTextInputState(const ui::TextInputState& state) override;
128 void SetImeVisibility(bool visible) override; 137 void SetImeVisibility(bool visible) override;
129 bool IsFramePending() const override; 138 bool IsFramePending() const override;
130 void RequestCopyOfOutput( 139 void RequestCopyOfOutput(
131 std::unique_ptr<cc::CopyOutputRequest> output_request) override; 140 std::unique_ptr<cc::CopyOutputRequest> output_request) override;
132 gfx::Rect GetBounds() const override; 141 gfx::Rect GetBounds() const override;
133 bool IsPrimaryDisplay() const override; 142 bool IsPrimaryDisplay() const override;
143 void OnGpuChannelEstablished(
144 scoped_refptr<gpu::GpuChannelHost> gpu_channel) override;
134 145
135 private: 146 private:
136 void UpdateMetrics(const gfx::Rect& bounds, float device_scale_factor); 147 void UpdateMetrics(const gfx::Rect& bounds, float device_scale_factor);
137 148
138 // Update the root_location of located events to be relative to the origin 149 // Update the root_location of located events to be relative to the origin
139 // of this display. For example, if the origin of this display is (1800, 0) 150 // of this display. For example, if the origin of this display is (1800, 0)
140 // and the location of the event is (100, 200) then the root_location will be 151 // and the location of the event is (100, 200) then the root_location will be
141 // updated to be (1900, 200). 152 // updated to be (1900, 200).
142 void UpdateEventRootLocation(ui::LocatedEvent* event); 153 void UpdateEventRootLocation(ui::LocatedEvent* event);
143 154
(...skipping 30 matching lines...) Expand all
174 std::unique_ptr<ui::PlatformWindow> platform_window_; 185 std::unique_ptr<ui::PlatformWindow> platform_window_;
175 186
176 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay); 187 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay);
177 }; 188 };
178 189
179 } // namespace ws 190 } // namespace ws
180 191
181 } // namespace ui 192 } // namespace ui
182 193
183 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 194 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_
OLDNEW
« no previous file with comments | « services/ui/ws/mus_gpu_memory_buffer_manager.cc ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698