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

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

Issue 10918182: Don't require a recreation of the context when fullscreening (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix style Created 8 years, 3 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
OLDNEW
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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 webkit::ppapi::PluginDelegate::PlatformContext3D* 355 webkit::ppapi::PluginDelegate::PlatformContext3D*
356 RenderWidgetFullscreenPepper::CreateContext3D() { 356 RenderWidgetFullscreenPepper::CreateContext3D() {
357 #ifdef ENABLE_GPU 357 #ifdef ENABLE_GPU
358 return new content::PlatformContext3DImpl(this); 358 return new content::PlatformContext3DImpl(this);
359 #else 359 #else
360 return NULL; 360 return NULL;
361 #endif 361 #endif
362 } 362 }
363 363
364 void RenderWidgetFullscreenPepper::ReparentContext(
365 webkit::ppapi::PluginDelegate::PlatformContext3D* context) {
366 static_cast<content::PlatformContext3DImpl*>(context)->SetParentContext(this);
367 }
368
364 MouseLockDispatcher* RenderWidgetFullscreenPepper::GetMouseLockDispatcher() { 369 MouseLockDispatcher* RenderWidgetFullscreenPepper::GetMouseLockDispatcher() {
365 return mouse_lock_dispatcher_.get(); 370 return mouse_lock_dispatcher_.get();
366 } 371 }
367 372
368 bool RenderWidgetFullscreenPepper::OnMessageReceived(const IPC::Message& msg) { 373 bool RenderWidgetFullscreenPepper::OnMessageReceived(const IPC::Message& msg) {
369 bool handled = true; 374 bool handled = true;
370 IPC_BEGIN_MESSAGE_MAP(RenderWidgetFullscreenPepper, msg) 375 IPC_BEGIN_MESSAGE_MAP(RenderWidgetFullscreenPepper, msg)
371 IPC_MESSAGE_FORWARD(ViewMsg_LockMouse_ACK, 376 IPC_MESSAGE_FORWARD(ViewMsg_LockMouse_ACK,
372 mouse_lock_dispatcher_.get(), 377 mouse_lock_dispatcher_.get(),
373 MouseLockDispatcher::OnLockMouseACK) 378 MouseLockDispatcher::OnLockMouseACK)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 593
589 WebGraphicsContext3DCommandBufferImpl* 594 WebGraphicsContext3DCommandBufferImpl*
590 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { 595 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() {
591 if (!context_) { 596 if (!context_) {
592 CreateContext(); 597 CreateContext();
593 } 598 }
594 if (!context_) 599 if (!context_)
595 return NULL; 600 return NULL;
596 return context_; 601 return context_;
597 } 602 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698