Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: content/renderer/render_widget_fullscreen_pepper.cc

Issue 8342024: Fixed bugs with Pepper 3D under dynamic GPU switching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_widget_fullscreen_pepper.h ('k') | ui/gfx/gl/gl_context_cgl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « content/renderer/render_widget_fullscreen_pepper.h ('k') | ui/gfx/gl/gl_context_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698