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