| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/view_messages.h" | 9 #include "content/common/view_messages.h" |
| 10 #include "content/renderer/gpu/gpu_channel_host.h" | 10 #include "content/renderer/gpu/gpu_channel_host.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 Release(); | 270 Release(); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void RenderWidgetFullscreenPepper::DidChangeCursor( | 273 void RenderWidgetFullscreenPepper::DidChangeCursor( |
| 274 const WebKit::WebCursorInfo& cursor) { | 274 const WebKit::WebCursorInfo& cursor) { |
| 275 didChangeCursor(cursor); | 275 didChangeCursor(cursor); |
| 276 } | 276 } |
| 277 | 277 |
| 278 webkit::ppapi::PluginDelegate::PlatformContext3D* | 278 webkit::ppapi::PluginDelegate::PlatformContext3D* |
| 279 RenderWidgetFullscreenPepper::CreateContext3D() { | 279 RenderWidgetFullscreenPepper::CreateContext3D() { |
| 280 if (!context_) { | |
| 281 CreateContext(); | |
| 282 } | |
| 283 if (!context_) | |
| 284 return NULL; | |
| 285 #ifdef ENABLE_GPU | 280 #ifdef ENABLE_GPU |
| 286 return new PlatformContext3DImpl(context_); | 281 return new PlatformContext3DImpl(this); |
| 287 #else | 282 #else |
| 288 return NULL; | 283 return NULL; |
| 289 #endif | 284 #endif |
| 290 } | 285 } |
| 291 | 286 |
| 292 void RenderWidgetFullscreenPepper::DidInitiatePaint() { | 287 void RenderWidgetFullscreenPepper::DidInitiatePaint() { |
| 293 if (plugin_) | 288 if (plugin_) |
| 294 plugin_->ViewInitiatedPaint(); | 289 plugin_->ViewInitiatedPaint(); |
| 295 } | 290 } |
| 296 | 291 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 context_ = NULL; | 501 context_ = NULL; |
| 507 program_ = 0; | 502 program_ = 0; |
| 508 buffer_ = 0; | 503 buffer_ = 0; |
| 509 OnSwapBuffersAborted(); | 504 OnSwapBuffersAborted(); |
| 510 CheckCompositing(); | 505 CheckCompositing(); |
| 511 } | 506 } |
| 512 | 507 |
| 513 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { | 508 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { |
| 514 OnSwapBuffersComplete(); | 509 OnSwapBuffersComplete(); |
| 515 } | 510 } |
| 511 |
| 512 RendererGLContext* |
| 513 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { |
| 514 if (!context_) { |
| 515 CreateContext(); |
| 516 } |
| 517 if (!context_) |
| 518 return NULL; |
| 519 return context_; |
| 520 } |
| OLD | NEW |