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 #include "content/renderer/render_widget_fullscreen_pepper.h" | 5 #include "content/renderer/render_widget_fullscreen_pepper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "content/common/gpu/client/gpu_channel_host.h" | 9 #include "content/common/gpu/client/gpu_channel_host.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 | 101 |
102 virtual void willEndLiveResize() { | 102 virtual void willEndLiveResize() { |
103 } | 103 } |
104 | 104 |
105 virtual void animate(double frameBeginTime) { | 105 virtual void animate(double frameBeginTime) { |
106 } | 106 } |
107 | 107 |
108 virtual void layout() { | 108 virtual void layout() { |
109 } | 109 } |
110 | 110 |
111 #if WEBWIDGET_HAS_PAINT_OPTIONS | |
112 virtual void paint(WebCanvas* canvas, | |
113 const WebRect& rect, | |
114 PaintOptions = ReadbackFromCompositorIfAvailable) { | |
piman
2012/08/21 17:28:35
nit: I don't think the default value is needed, th
| |
115 #else | |
111 virtual void paint(WebCanvas* canvas, const WebRect& rect) { | 116 virtual void paint(WebCanvas* canvas, const WebRect& rect) { |
117 #endif | |
112 if (!widget_->plugin()) | 118 if (!widget_->plugin()) |
113 return; | 119 return; |
114 | 120 |
115 WebRect plugin_rect(0, 0, size_.width, size_.height); | 121 WebRect plugin_rect(0, 0, size_.width, size_.height); |
116 widget_->plugin()->Paint(canvas, plugin_rect, rect); | 122 widget_->plugin()->Paint(canvas, plugin_rect, rect); |
117 } | 123 } |
118 | 124 |
119 #if WEBWIDGET_HAS_SETCOMPOSITORSURFACEREADY | 125 #if WEBWIDGET_HAS_SETCOMPOSITORSURFACEREADY |
120 virtual void setCompositorSurfaceReady() { | 126 virtual void setCompositorSurfaceReady() { |
121 } | 127 } |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
575 | 581 |
576 WebGraphicsContext3DCommandBufferImpl* | 582 WebGraphicsContext3DCommandBufferImpl* |
577 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { | 583 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { |
578 if (!context_) { | 584 if (!context_) { |
579 CreateContext(); | 585 CreateContext(); |
580 } | 586 } |
581 if (!context_) | 587 if (!context_) |
582 return NULL; | 588 return NULL; |
583 return context_; | 589 return context_; |
584 } | 590 } |
OLD | NEW |