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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor changes, rebasing with master Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
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>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/linked_ptr.h" 13 #include "base/memory/linked_ptr.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h"
15 #include "content/browser/renderer_host/image_transport_factory.h" 16 #include "content/browser/renderer_host/image_transport_factory.h"
16 #include "content/browser/renderer_host/render_widget_host_view_base.h" 17 #include "content/browser/renderer_host/render_widget_host_view_base.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 #include "ui/aura/client/activation_delegate.h" 19 #include "ui/aura/client/activation_delegate.h"
19 #include "ui/aura/window_delegate.h" 20 #include "ui/aura/window_delegate.h"
20 #include "ui/base/ime/text_input_client.h" 21 #include "ui/base/ime/text_input_client.h"
21 #include "ui/compositor/compositor_observer.h" 22 #include "ui/compositor/compositor_observer.h"
22 #include "ui/gfx/rect.h" 23 #include "ui/gfx/rect.h"
23 #include "webkit/glue/webcursor.h" 24 #include "webkit/glue/webcursor.h"
24 25
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 int gpu_host_id) OVERRIDE; 105 int gpu_host_id) OVERRIDE;
105 virtual void AcceleratedSurfacePostSubBuffer( 106 virtual void AcceleratedSurfacePostSubBuffer(
106 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, 107 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel,
107 int gpu_host_id) OVERRIDE; 108 int gpu_host_id) OVERRIDE;
108 virtual void AcceleratedSurfaceSuspend() OVERRIDE; 109 virtual void AcceleratedSurfaceSuspend() OVERRIDE;
109 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; 110 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
110 virtual void AcceleratedSurfaceNew( 111 virtual void AcceleratedSurfaceNew(
111 int32 width_in_pixel, 112 int32 width_in_pixel,
112 int32 height_in_pixel, 113 int32 height_in_pixel,
113 uint64* surface_id, 114 uint64* surface_id,
114 TransportDIB::Handle* surface_handle) OVERRIDE; 115 TransportDIB::Handle* surface_handle,
116 int32 route_id,
117 int gpu_host_id) OVERRIDE;
115 virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE; 118 virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE;
119 virtual void AcceleratedSurfaceRequestReleaseFront(uint64 surface_id,
120 int request_id,
121 int retry_count,
122 int32 route_id,
123 int gpu_host_id) OVERRIDE;
116 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; 124 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
117 virtual gfx::Rect GetRootWindowBounds() OVERRIDE; 125 virtual gfx::Rect GetRootWindowBounds() OVERRIDE;
118 virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type, 126 virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type,
119 bool processed) OVERRIDE; 127 bool processed) OVERRIDE;
120 virtual void SetHasHorizontalScrollbar( 128 virtual void SetHasHorizontalScrollbar(
121 bool has_horizontal_scrollbar) OVERRIDE; 129 bool has_horizontal_scrollbar) OVERRIDE;
122 virtual void SetScrollOffsetPinning( 130 virtual void SetScrollOffsetPinning(
123 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; 131 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
124 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; 132 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
125 virtual bool LockMouse() OVERRIDE; 133 virtual bool LockMouse() OVERRIDE;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // Helper method to determine if, in mouse locked mode, the cursor should be 219 // Helper method to determine if, in mouse locked mode, the cursor should be
212 // moved to center. 220 // moved to center.
213 bool ShouldMoveToCenter(); 221 bool ShouldMoveToCenter();
214 222
215 // Run the compositing callbacks. 223 // Run the compositing callbacks.
216 void RunCompositingCallbacks(); 224 void RunCompositingCallbacks();
217 225
218 // Called when window_ is removed from the window tree. 226 // Called when window_ is removed from the window tree.
219 void RemovingFromRootWindow(); 227 void RemovingFromRootWindow();
220 228
229 void InvalidatePendingRequestReleaseFrontRequest();
230 void ReleaseFrontSurfaceIfStillValid(uint64 surface_id,
231 int request_id,
232 int retry_count,
233 int32 route_id,
234 int gpu_host_id);
235 void SendRequestReleaseFrontAckAfterThumbnailIfNecessary(int request_id,
236 int retry_count,
237 bool was_released,
238 int32 route_id,
239 int gpu_host_id);
240 void CopyFromCompositingSurfaceFinished(base::Callback<void(bool)> callback,
241 bool result);
242
221 ui::Compositor* GetCompositor(); 243 ui::Compositor* GetCompositor();
222 244
223 // The model object. 245 // The model object.
224 content::RenderWidgetHostImpl* host_; 246 content::RenderWidgetHostImpl* host_;
225 247
226 aura::Window* window_; 248 aura::Window* window_;
227 249
228 scoped_ptr<WindowObserver> window_observer_; 250 scoped_ptr<WindowObserver> window_observer_;
229 251
230 // Are we in the process of closing? Tracked so fullscreen views can avoid 252 // Are we in the process of closing? Tracked so fullscreen views can avoid
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // Current tooltip text. 288 // Current tooltip text.
267 string16 tooltip_; 289 string16 tooltip_;
268 290
269 std::vector< base::Callback<void(void)> > on_compositing_ended_callbacks_; 291 std::vector< base::Callback<void(void)> > on_compositing_ended_callbacks_;
270 292
271 std::map<uint64, scoped_refptr<ImageTransportClient> > 293 std::map<uint64, scoped_refptr<ImageTransportClient> >
272 image_transport_clients_; 294 image_transport_clients_;
273 295
274 uint64 current_surface_; 296 uint64 current_surface_;
275 297
298 int32 route_id_;
299 int gpu_host_id_;
300
301 // Factory used to safely scope delayed calls.
302 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_factory_;
303
304 // Stores the request id of the most recent request release front message.
305 // If surface state changes, or a new release request is received, this id
306 // is updated to invalidate any pending release request.
307 int current_valid_release_front_request_id_;
308
309 bool is_thumbnailing_;
310
311 // This is used to delay sending a release front ack until thumbnailing
312 // is finished (used if we are thumbnailing at time of release request).
313 std::vector<base::Callback<void(void)> > delayed_release_front_acks_;
314
276 gfx::GLSurfaceHandle shared_surface_handle_; 315 gfx::GLSurfaceHandle shared_surface_handle_;
277 316
278 // If non-NULL we're in OnPaint() and this is the supplied canvas. 317 // If non-NULL we're in OnPaint() and this is the supplied canvas.
279 gfx::Canvas* paint_canvas_; 318 gfx::Canvas* paint_canvas_;
280 319
281 // Used to record the last position of the mouse. 320 // Used to record the last position of the mouse.
282 // While the mouse is locked, they store the last known position just as mouse 321 // While the mouse is locked, they store the last known position just as mouse
283 // lock was entered. 322 // lock was entered.
284 // Relative to the upper-left corner of the view. 323 // Relative to the upper-left corner of the view.
285 gfx::Point unlocked_mouse_position_; 324 gfx::Point unlocked_mouse_position_;
(...skipping 16 matching lines...) Expand all
302 // These locks are the ones waiting for a texture of the right size to come 341 // These locks are the ones waiting for a texture of the right size to come
303 // back from the renderer/GPU process. 342 // back from the renderer/GPU process.
304 std::vector<linked_ptr<ResizeLock> > resize_locks_; 343 std::vector<linked_ptr<ResizeLock> > resize_locks_;
305 // These locks are the ones waiting for a frame to be drawn. 344 // These locks are the ones waiting for a frame to be drawn.
306 std::vector<linked_ptr<ResizeLock> > locks_pending_draw_; 345 std::vector<linked_ptr<ResizeLock> > locks_pending_draw_;
307 346
308 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 347 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
309 }; 348 };
310 349
311 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 350 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698