| 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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 return surface_id_; | 102 return surface_id_; |
| 103 } | 103 } |
| 104 | 104 |
| 105 // May return NULL when the window is closing. | 105 // May return NULL when the window is closing. |
| 106 WebKit::WebWidget* webwidget() const { return webwidget_; } | 106 WebKit::WebWidget* webwidget() const { return webwidget_; } |
| 107 | 107 |
| 108 gfx::Size size() const { return size_; } | 108 gfx::Size size() const { return size_; } |
| 109 bool has_focus() const { return has_focus_; } | 109 bool has_focus() const { return has_focus_; } |
| 110 bool is_fullscreen() const { return is_fullscreen_; } | 110 bool is_fullscreen() const { return is_fullscreen_; } |
| 111 bool is_hidden() const { return is_hidden_; } | 111 bool is_hidden() const { return is_hidden_; } |
| 112 bool allow_partial_swap() const { return allow_partial_swap_; } |
| 112 | 113 |
| 113 // IPC::Listener | 114 // IPC::Listener |
| 114 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 115 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 115 | 116 |
| 116 // IPC::Sender | 117 // IPC::Sender |
| 117 virtual bool Send(IPC::Message* msg) OVERRIDE; | 118 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 118 | 119 |
| 119 // WebKit::WebWidgetClient | 120 // WebKit::WebWidgetClient |
| 120 virtual void suppressCompositorScheduling(bool enable); | 121 virtual void suppressCompositorScheduling(bool enable); |
| 121 virtual void willBeginCompositorFrame(); | 122 virtual void willBeginCompositorFrame(); |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 bool update_reply_pending_; | 521 bool update_reply_pending_; |
| 521 | 522 |
| 522 // True if we need to send an UpdateRect message to notify the browser about | 523 // True if we need to send an UpdateRect message to notify the browser about |
| 523 // an already-completed auto-resize. | 524 // an already-completed auto-resize. |
| 524 bool need_update_rect_for_auto_resize_; | 525 bool need_update_rect_for_auto_resize_; |
| 525 | 526 |
| 526 // True if the underlying graphics context supports asynchronous swap. | 527 // True if the underlying graphics context supports asynchronous swap. |
| 527 // Cached on the RenderWidget because determining support is costly. | 528 // Cached on the RenderWidget because determining support is costly. |
| 528 bool using_asynchronous_swapbuffers_; | 529 bool using_asynchronous_swapbuffers_; |
| 529 | 530 |
| 531 // Specifies whether partially swapping composited buffers is |
| 532 // allowed for a renderer. Partial swaps will be used if they are both |
| 533 // allowed and supported. |
| 534 bool allow_partial_swap_; |
| 535 |
| 530 // Number of OnSwapBuffersComplete we are expecting. Incremented each time | 536 // Number of OnSwapBuffersComplete we are expecting. Incremented each time |
| 531 // WebWidget::composite has been been performed when the RenderWidget subclass | 537 // WebWidget::composite has been been performed when the RenderWidget subclass |
| 532 // SupportsAsynchronousSwapBuffers. Decremented in OnSwapBuffers. Will block | 538 // SupportsAsynchronousSwapBuffers. Decremented in OnSwapBuffers. Will block |
| 533 // rendering. | 539 // rendering. |
| 534 int num_swapbuffers_complete_pending_; | 540 int num_swapbuffers_complete_pending_; |
| 535 | 541 |
| 536 // When accelerated rendering is on, is the maximum number of swapbuffers that | 542 // When accelerated rendering is on, is the maximum number of swapbuffers that |
| 537 // can be outstanding before we start throttling based on | 543 // can be outstanding before we start throttling based on |
| 538 // OnSwapBuffersComplete callback. | 544 // OnSwapBuffersComplete callback. |
| 539 static const int kMaxSwapBuffersPending = 2; | 545 static const int kMaxSwapBuffersPending = 2; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 | 667 |
| 662 // Specified whether the compositor will run in its own thread. | 668 // Specified whether the compositor will run in its own thread. |
| 663 bool is_threaded_compositing_enabled_; | 669 bool is_threaded_compositing_enabled_; |
| 664 | 670 |
| 665 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 671 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 666 }; | 672 }; |
| 667 | 673 |
| 668 } // namespace content | 674 } // namespace content |
| 669 | 675 |
| 670 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 676 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |