| 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/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
| 9 #include "content/renderer/gpu/gpu_channel_host.h" | 9 #include "content/renderer/gpu/gpu_channel_host.h" |
| 10 #include "content/renderer/pepper_platform_context_3d_impl.h" | 10 #include "content/renderer/pepper_platform_context_3d_impl.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 didChangeCursor(cursor); | 270 didChangeCursor(cursor); |
| 271 } | 271 } |
| 272 | 272 |
| 273 webkit::ppapi::PluginDelegate::PlatformContext3D* | 273 webkit::ppapi::PluginDelegate::PlatformContext3D* |
| 274 RenderWidgetFullscreenPepper::CreateContext3D() { | 274 RenderWidgetFullscreenPepper::CreateContext3D() { |
| 275 if (!context_) { | 275 if (!context_) { |
| 276 CreateContext(); | 276 CreateContext(); |
| 277 } | 277 } |
| 278 if (!context_) | 278 if (!context_) |
| 279 return NULL; | 279 return NULL; |
| 280 #ifdef ENABLE_GPU |
| 280 return new PlatformContext3DImpl(context_); | 281 return new PlatformContext3DImpl(context_); |
| 282 #else |
| 283 return NULL; |
| 284 #endif |
| 281 } | 285 } |
| 282 | 286 |
| 283 void RenderWidgetFullscreenPepper::DidInitiatePaint() { | 287 void RenderWidgetFullscreenPepper::DidInitiatePaint() { |
| 284 if (plugin_) | 288 if (plugin_) |
| 285 plugin_->ViewInitiatedPaint(); | 289 plugin_->ViewInitiatedPaint(); |
| 286 } | 290 } |
| 287 | 291 |
| 288 void RenderWidgetFullscreenPepper::DidFlushPaint() { | 292 void RenderWidgetFullscreenPepper::DidFlushPaint() { |
| 289 if (plugin_) | 293 if (plugin_) |
| 290 plugin_->ViewFlushedPaint(); | 294 plugin_->ViewFlushedPaint(); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 context_ = NULL; | 495 context_ = NULL; |
| 492 program_ = 0; | 496 program_ = 0; |
| 493 buffer_ = 0; | 497 buffer_ = 0; |
| 494 OnSwapBuffersAborted(); | 498 OnSwapBuffersAborted(); |
| 495 CheckCompositing(); | 499 CheckCompositing(); |
| 496 } | 500 } |
| 497 | 501 |
| 498 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { | 502 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { |
| 499 OnSwapBuffersComplete(); | 503 OnSwapBuffersComplete(); |
| 500 } | 504 } |
| OLD | NEW |