OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 // If |clip| is non-empty and and doesn't contain |rect| or |clip| is empty | 223 // If |clip| is non-empty and and doesn't contain |rect| or |clip| is empty |
224 // SchedulePaint() is invoked for |rect|. | 224 // SchedulePaint() is invoked for |rect|. |
225 void SchedulePaintIfNotInClip(const gfx::Rect& rect, const gfx::Rect& clip); | 225 void SchedulePaintIfNotInClip(const gfx::Rect& rect, const gfx::Rect& clip); |
226 | 226 |
227 // Helper method to determine if, in mouse locked mode, the cursor should be | 227 // Helper method to determine if, in mouse locked mode, the cursor should be |
228 // moved to center. | 228 // moved to center. |
229 bool ShouldMoveToCenter(); | 229 bool ShouldMoveToCenter(); |
230 | 230 |
231 // Run the compositing callbacks. | 231 // Run the compositing callbacks. |
232 void RunCompositingCallbacks(); | 232 void RunCompositingCallbacks(ui::Compositor* compositor); |
233 | 233 |
234 // Insert a sync point into the compositor's command stream and acknowledge | 234 // Insert a sync point into the compositor's command stream and acknowledge |
235 // that we have presented the accelerated surface buffer. | 235 // that we have presented the accelerated surface buffer. |
236 void InsertSyncPointAndACK(int32 route_id, int gpu_host_id); | 236 static void InsertSyncPointAndACK(int32 route_id, |
| 237 int gpu_host_id, |
| 238 ui::Compositor* compositor); |
237 | 239 |
238 // Called when window_ is removed from the window tree. | 240 // Called when window_ is removed from the window tree. |
239 void RemovingFromRootWindow(); | 241 void RemovingFromRootWindow(); |
240 | 242 |
241 ui::Compositor* GetCompositor(); | 243 ui::Compositor* GetCompositor(); |
242 | 244 |
243 // Detaches |this| from the input method object. | 245 // Detaches |this| from the input method object. |
244 void DetachFromInputMethod(); | 246 void DetachFromInputMethod(); |
245 | 247 |
246 // Converts |rect| from window coordinate to screen coordinate. | 248 // Converts |rect| from window coordinate to screen coordinate. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 290 |
289 // The current composition character bounds. | 291 // The current composition character bounds. |
290 std::vector<gfx::Rect> composition_character_bounds_; | 292 std::vector<gfx::Rect> composition_character_bounds_; |
291 | 293 |
292 // Indicates if there is onging composition text. | 294 // Indicates if there is onging composition text. |
293 bool has_composition_text_; | 295 bool has_composition_text_; |
294 | 296 |
295 // Current tooltip text. | 297 // Current tooltip text. |
296 string16 tooltip_; | 298 string16 tooltip_; |
297 | 299 |
298 std::vector< base::Callback<void(void)> > | 300 std::vector< base::Callback<void(ui::Compositor*)> > |
299 on_compositing_will_start_callbacks_; | 301 on_compositing_will_start_callbacks_; |
300 | 302 |
301 std::map<uint64, scoped_refptr<ImageTransportClient> > | 303 std::map<uint64, scoped_refptr<ImageTransportClient> > |
302 image_transport_clients_; | 304 image_transport_clients_; |
303 | 305 |
304 uint64 current_surface_; | 306 uint64 current_surface_; |
305 | 307 |
306 gfx::GLSurfaceHandle shared_surface_handle_; | 308 gfx::GLSurfaceHandle shared_surface_handle_; |
307 | 309 |
308 // If non-NULL we're in OnPaint() and this is the supplied canvas. | 310 // If non-NULL we're in OnPaint() and this is the supplied canvas. |
(...skipping 26 matching lines...) Expand all Loading... |
335 // These locks are the ones waiting for a frame to be drawn. | 337 // These locks are the ones waiting for a frame to be drawn. |
336 std::vector<linked_ptr<ResizeLock> > locks_pending_draw_; | 338 std::vector<linked_ptr<ResizeLock> > locks_pending_draw_; |
337 | 339 |
338 // This lock is for waiting for a front surface to become available to draw. | 340 // This lock is for waiting for a front surface to become available to draw. |
339 scoped_refptr<aura::CompositorLock> released_front_lock_; | 341 scoped_refptr<aura::CompositorLock> released_front_lock_; |
340 | 342 |
341 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 343 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
342 }; | 344 }; |
343 | 345 |
344 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 346 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |