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

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

Issue 13042012: Browser side changes for software compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 virtual void AccessibilityScrollToPoint( 309 virtual void AccessibilityScrollToPoint(
310 int acc_obj_id, gfx::Point point) OVERRIDE; 310 int acc_obj_id, gfx::Point point) OVERRIDE;
311 virtual void AccessibilitySetTextSelection( 311 virtual void AccessibilitySetTextSelection(
312 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; 312 int acc_obj_id, int start_offset, int end_offset) OVERRIDE;
313 virtual gfx::Point GetLastTouchEventLocation() const OVERRIDE; 313 virtual gfx::Point GetLastTouchEventLocation() const OVERRIDE;
314 virtual void FatalAccessibilityTreeError() OVERRIDE; 314 virtual void FatalAccessibilityTreeError() OVERRIDE;
315 315
316 virtual ~RenderWidgetHostViewAura(); 316 virtual ~RenderWidgetHostViewAura();
317 317
318 void UpdateCursorIfOverSelf(); 318 void UpdateCursorIfOverSelf();
319 bool ShouldSkipFrame(gfx::Size size_in_dip); 319 bool ShouldSkipFrame(gfx::Size size_in_dip) const;
320 void CheckResizeLocks(gfx::Size size_in_dip); 320 void CheckResizeLocks(gfx::Size size_in_dip);
321 void UpdateExternalTexture(); 321 void UpdateExternalTexture();
322 ui::InputMethod* GetInputMethod() const; 322 ui::InputMethod* GetInputMethod() const;
323 323
324 // Returns whether the widget needs an input grab to work properly. 324 // Returns whether the widget needs an input grab to work properly.
325 bool NeedsInputGrab(); 325 bool NeedsInputGrab();
326 326
327 // Confirm existing composition text in the webpage and ask the input method 327 // Confirm existing composition text in the webpage and ask the input method
328 // to cancel its ongoing composition session. 328 // to cancel its ongoing composition session.
329 void FinishImeCompositionSession(); 329 void FinishImeCompositionSession();
330 330
331 // This method computes movementX/Y and keeps track of mouse location for 331 // This method computes movementX/Y and keeps track of mouse location for
332 // mouse lock on all mouse move events. 332 // mouse lock on all mouse move events.
333 void ModifyEventMovementAndCoords(WebKit::WebMouseEvent* event); 333 void ModifyEventMovementAndCoords(WebKit::WebMouseEvent* event);
334 334
335 // If |clip| is non-empty and and doesn't contain |rect| or |clip| is empty 335 // If |clip| is non-empty and and doesn't contain |rect| or |clip| is empty
336 // SchedulePaint() is invoked for |rect|. 336 // SchedulePaint() is invoked for |rect|.
337 void SchedulePaintIfNotInClip(const gfx::Rect& rect, const gfx::Rect& clip); 337 void SchedulePaintIfNotInClip(const gfx::Rect& rect, const gfx::Rect& clip);
338 338
339 // Helper method to determine if, in mouse locked mode, the cursor should be 339 // Helper method to determine if, in mouse locked mode, the cursor should be
340 // moved to center. 340 // moved to center.
341 bool ShouldMoveToCenter(); 341 bool ShouldMoveToCenter();
342 342
343 // Run the compositing callbacks. 343 // Run all on compositing commit callbacks.
344 void RunCompositingDidCommitCallbacks(); 344 void RunOnCommitCallbacks();
345
346 // Add on compositing commit callback.
347 void AddOnCommitCallbackAndDisableLocks(const base::Closure& callback);
345 348
346 // Called after |window_| is parented to a RootWindow. 349 // Called after |window_| is parented to a RootWindow.
347 void AddedToRootWindow(); 350 void AddedToRootWindow();
348 351
349 // Called prior to removing |window_| from a RootWindow. 352 // Called prior to removing |window_| from a RootWindow.
350 void RemovingFromRootWindow(); 353 void RemovingFromRootWindow();
351 354
352 // Called after commit for the last reference to the texture going away 355 // Called after commit for the last reference to the texture going away
353 // after it was released as the frontbuffer. 356 // after it was released as the frontbuffer.
354 void SetSurfaceNotInUseByCompositor(scoped_refptr<ui::Texture>); 357 void SetSurfaceNotInUseByCompositor(scoped_refptr<ui::Texture>);
(...skipping 29 matching lines...) Expand all
384 bool SwapBuffersPrepare(const gfx::Rect& surface_rect, 387 bool SwapBuffersPrepare(const gfx::Rect& surface_rect,
385 const gfx::Rect& damage_rect, 388 const gfx::Rect& damage_rect,
386 const std::string& mailbox_name, 389 const std::string& mailbox_name,
387 const BufferPresentedCallback& ack_callback); 390 const BufferPresentedCallback& ack_callback);
388 391
389 void SwapBuffersCompleted( 392 void SwapBuffersCompleted(
390 const BufferPresentedCallback& ack_callback, 393 const BufferPresentedCallback& ack_callback,
391 const scoped_refptr<ui::Texture>& texture_to_return); 394 const scoped_refptr<ui::Texture>& texture_to_return);
392 395
393 void SwapDelegatedFrame( 396 void SwapDelegatedFrame(
394 scoped_ptr<cc::DelegatedFrameData> frame, 397 scoped_ptr<cc::DelegatedFrameData> frame_data,
395 float device_scale_factor); 398 float frame_device_scale_factor);
396 void SendDelegatedFrameAck(); 399 void SendDelegatedFrameAck();
397 400
401 void SwapSoftwareFrame(
402 scoped_ptr<cc::SoftwareFrameData> frame_data,
403 float frame_device_scale_factor);
404 void SendSoftwareFrameAck(const TransportDIB::Id& id);
405
398 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); 406 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager();
399 407
400 #if defined(OS_WIN) 408 #if defined(OS_WIN)
401 // Sets the cutout rects from transient windows. These are rectangles that 409 // Sets the cutout rects from transient windows. These are rectangles that
402 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout 410 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout
403 // rects. 411 // rects.
404 void UpdateTransientRects(const std::vector<gfx::Rect>& rects); 412 void UpdateTransientRects(const std::vector<gfx::Rect>& rects);
405 413
406 // Updates the total list of cutout rects, which is the union of transient 414 // Updates the total list of cutout rects, which is the union of transient
407 // windows and constrained windows. 415 // windows and constrained windows.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 bool has_composition_text_; 472 bool has_composition_text_;
465 473
466 // Current tooltip text. 474 // Current tooltip text.
467 string16 tooltip_; 475 string16 tooltip_;
468 476
469 std::vector<base::Closure> on_compositing_did_commit_callbacks_; 477 std::vector<base::Closure> on_compositing_did_commit_callbacks_;
470 478
471 // The current frontbuffer texture. 479 // The current frontbuffer texture.
472 scoped_refptr<ui::Texture> current_surface_; 480 scoped_refptr<ui::Texture> current_surface_;
473 481
482 // The current frontbuffer DIB.
483 scoped_ptr<TransportDIB> current_dib_;
484
485 // The current DIB id as it was received from the renderer. Note that on
486 // some platforms (e.g. Windows) this is different from current_dib_->id().
487 TransportDIB::Id current_dib_id_;
488
474 // The damage in the previously presented buffer. 489 // The damage in the previously presented buffer.
475 SkRegion previous_damage_; 490 SkRegion previous_damage_;
476 491
477 // Pending damage from previous frames that we skipped. 492 // Pending damage from previous frames that we skipped.
478 SkRegion skipped_damage_; 493 SkRegion skipped_damage_;
479 494
480 // The size of the last frame that was swapped (even if we skipped it). 495 // The size of the last frame that was swapped (even if we skipped it).
481 // Used to determine when the skipped_damage_ needs to be reset due to 496 // Used to determine when the skipped_damage_ needs to be reset due to
482 // size changes between front- and backbuffer. 497 // size changes between front- and backbuffer.
483 gfx::Size last_swapped_surface_size_; 498 gfx::Size last_swapped_surface_size_;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 base::TimeTicks last_draw_ended_; 576 base::TimeTicks last_draw_ended_;
562 577
563 gfx::NativeViewAccessible accessible_parent_; 578 gfx::NativeViewAccessible accessible_parent_;
564 579
565 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 580 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
566 }; 581 };
567 582
568 } // namespace content 583 } // namespace content
569 584
570 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 585 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698