| 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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 virtual void AcceleratedSurfacePostSubBuffer( | 114 virtual void AcceleratedSurfacePostSubBuffer( |
| 115 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, | 115 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, |
| 116 int gpu_host_id) OVERRIDE; | 116 int gpu_host_id) OVERRIDE; |
| 117 virtual void AcceleratedSurfaceSuspend() OVERRIDE; | 117 virtual void AcceleratedSurfaceSuspend() OVERRIDE; |
| 118 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; | 118 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; |
| 119 virtual void AcceleratedSurfaceNew( | 119 virtual void AcceleratedSurfaceNew( |
| 120 int32 width_in_pixel, | 120 int32 width_in_pixel, |
| 121 int32 height_in_pixel, | 121 int32 height_in_pixel, |
| 122 uint64 surface_id) OVERRIDE; | 122 uint64 surface_id) OVERRIDE; |
| 123 virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE; | 123 virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE; |
| 124 virtual void SwapCompositorFrame( |
| 125 const WebKit::WebCompositorFrame& frame) OVERRIDE; |
| 124 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; | 126 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; |
| 125 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; | 127 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; |
| 126 virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type, | 128 virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type, |
| 127 bool processed) OVERRIDE; | 129 bool processed) OVERRIDE; |
| 128 virtual void SetHasHorizontalScrollbar( | 130 virtual void SetHasHorizontalScrollbar( |
| 129 bool has_horizontal_scrollbar) OVERRIDE; | 131 bool has_horizontal_scrollbar) OVERRIDE; |
| 130 virtual void SetScrollOffsetPinning( | 132 virtual void SetScrollOffsetPinning( |
| 131 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; | 133 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; |
| 132 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; | 134 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; |
| 133 virtual bool LockMouse() OVERRIDE; | 135 virtual bool LockMouse() OVERRIDE; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 239 |
| 238 // Run the compositing callbacks. | 240 // Run the compositing callbacks. |
| 239 void RunCompositingDidCommitCallbacks(ui::Compositor* compositor); | 241 void RunCompositingDidCommitCallbacks(ui::Compositor* compositor); |
| 240 void RunCompositingWillStartCallbacks(ui::Compositor* compositor); | 242 void RunCompositingWillStartCallbacks(ui::Compositor* compositor); |
| 241 | 243 |
| 242 // Insert a sync point into the compositor's command stream and acknowledge | 244 // Insert a sync point into the compositor's command stream and acknowledge |
| 243 // that we have presented the accelerated surface buffer. | 245 // that we have presented the accelerated surface buffer. |
| 244 static void InsertSyncPointAndACK(int32 route_id, | 246 static void InsertSyncPointAndACK(int32 route_id, |
| 245 int gpu_host_id, | 247 int gpu_host_id, |
| 246 ui::Compositor* compositor); | 248 ui::Compositor* compositor); |
| 249 void SwapCompositorFrameAck(ui::Compositor*); |
| 247 | 250 |
| 248 // Called when window_ is removed from the window tree. | 251 // Called when window_ is removed from the window tree. |
| 249 void RemovingFromRootWindow(); | 252 void RemovingFromRootWindow(); |
| 250 | 253 |
| 251 // After clearing |current_surface_|, and waiting for the compositor to finish | 254 // After clearing |current_surface_|, and waiting for the compositor to finish |
| 252 // using it, call this to inform the gpu process. | 255 // using it, call this to inform the gpu process. |
| 253 void SetSurfaceNotInUseByCompositor(ui::Compositor* compositor); | 256 void SetSurfaceNotInUseByCompositor(ui::Compositor* compositor); |
| 254 | 257 |
| 255 // This is called every time |current_surface_| usage changes (by thumbnailer, | 258 // This is called every time |current_surface_| usage changes (by thumbnailer, |
| 256 // compositor draws, and tab visibility). Every time usage of current surface | 259 // compositor draws, and tab visibility). Every time usage of current surface |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 | 383 |
| 381 // This lock is for waiting for a front surface to become available to draw. | 384 // This lock is for waiting for a front surface to become available to draw. |
| 382 scoped_refptr<aura::CompositorLock> released_front_lock_; | 385 scoped_refptr<aura::CompositorLock> released_front_lock_; |
| 383 | 386 |
| 384 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 387 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 385 }; | 388 }; |
| 386 | 389 |
| 387 } // namespace content | 390 } // namespace content |
| 388 | 391 |
| 389 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 392 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |