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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 450 |
451 // Converts |rect| from screen coordinate to window coordinate. | 451 // Converts |rect| from screen coordinate to window coordinate. |
452 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect); | 452 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect); |
453 | 453 |
454 typedef base::Callback<void(bool, const scoped_refptr<ui::Texture>&)> | 454 typedef base::Callback<void(bool, const scoped_refptr<ui::Texture>&)> |
455 BufferPresentedCallback; | 455 BufferPresentedCallback; |
456 | 456 |
457 // The common entry point for full buffer updates from renderer | 457 // The common entry point for full buffer updates from renderer |
458 // and GPU process. | 458 // and GPU process. |
459 void BuffersSwapped(const gfx::Size& size, | 459 void BuffersSwapped(const gfx::Size& size, |
| 460 float surface_scale_factor, |
460 const std::string& mailbox_name, | 461 const std::string& mailbox_name, |
461 const BufferPresentedCallback& ack_callback); | 462 const BufferPresentedCallback& ack_callback); |
462 | 463 |
463 bool SwapBuffersPrepare(const gfx::Rect& surface_rect, | 464 bool SwapBuffersPrepare(const gfx::Rect& surface_rect, |
| 465 float surface_scale_factor, |
464 const gfx::Rect& damage_rect, | 466 const gfx::Rect& damage_rect, |
465 const std::string& mailbox_name, | 467 const std::string& mailbox_name, |
466 const BufferPresentedCallback& ack_callback); | 468 const BufferPresentedCallback& ack_callback); |
467 | 469 |
468 void SwapBuffersCompleted( | 470 void SwapBuffersCompleted( |
469 const BufferPresentedCallback& ack_callback, | 471 const BufferPresentedCallback& ack_callback, |
470 const scoped_refptr<ui::Texture>& texture_to_return); | 472 const scoped_refptr<ui::Texture>& texture_to_return); |
471 | 473 |
472 void SwapDelegatedFrame( | 474 void SwapDelegatedFrame( |
473 scoped_ptr<cc::DelegatedFrameData> frame_data, | 475 scoped_ptr<cc::DelegatedFrameData> frame_data, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 // The damage in the previously presented buffer. | 567 // The damage in the previously presented buffer. |
566 SkRegion previous_damage_; | 568 SkRegion previous_damage_; |
567 | 569 |
568 // Pending damage from previous frames that we skipped. | 570 // Pending damage from previous frames that we skipped. |
569 SkRegion skipped_damage_; | 571 SkRegion skipped_damage_; |
570 | 572 |
571 // The size of the last frame that was swapped (even if we skipped it). | 573 // The size of the last frame that was swapped (even if we skipped it). |
572 // Used to determine when the skipped_damage_ needs to be reset due to | 574 // Used to determine when the skipped_damage_ needs to be reset due to |
573 // size changes between front- and backbuffer. | 575 // size changes between front- and backbuffer. |
574 gfx::Size last_swapped_surface_size_; | 576 gfx::Size last_swapped_surface_size_; |
| 577 float last_swapped_surface_scale_factor_; |
575 | 578 |
576 int pending_thumbnail_tasks_; | 579 int pending_thumbnail_tasks_; |
577 | 580 |
578 gfx::GLSurfaceHandle shared_surface_handle_; | 581 gfx::GLSurfaceHandle shared_surface_handle_; |
579 | 582 |
580 // If non-NULL we're in OnPaint() and this is the supplied canvas. | 583 // If non-NULL we're in OnPaint() and this is the supplied canvas. |
581 gfx::Canvas* paint_canvas_; | 584 gfx::Canvas* paint_canvas_; |
582 | 585 |
583 // Used to record the last position of the mouse. | 586 // Used to record the last position of the mouse. |
584 // While the mouse is locked, they store the last known position just as mouse | 587 // While the mouse is locked, they store the last known position just as mouse |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 671 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
669 | 672 |
670 TouchEditingClient* touch_editing_client_; | 673 TouchEditingClient* touch_editing_client_; |
671 | 674 |
672 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 675 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
673 }; | 676 }; |
674 | 677 |
675 } // namespace content | 678 } // namespace content |
676 | 679 |
677 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 680 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |