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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 void RenderWidgetFullscreenPepper::CreateContext() { | 430 void RenderWidgetFullscreenPepper::CreateContext() { |
431 DCHECK(!context_); | 431 DCHECK(!context_); |
432 WebKit::WebGraphicsContext3D::Attributes attributes; | 432 WebKit::WebGraphicsContext3D::Attributes attributes; |
433 attributes.depth = false; | 433 attributes.depth = false; |
434 attributes.stencil = false; | 434 attributes.stencil = false; |
435 attributes.antialias = false; | 435 attributes.antialias = false; |
436 attributes.shareResources = false; | 436 attributes.shareResources = false; |
437 context_ = WebGraphicsContext3DCommandBufferImpl::CreateViewContext( | 437 context_ = WebGraphicsContext3DCommandBufferImpl::CreateViewContext( |
438 RenderThreadImpl::current(), | 438 RenderThreadImpl::current(), |
439 surface_id(), | 439 surface_id(), |
440 "GL_OES_packed_depth_stencil GL_OES_depth24", | 440 NULL, |
441 attributes, | 441 attributes, |
442 true /* bind generates resources */, | 442 true /* bind generates resources */, |
443 active_url_, | 443 active_url_, |
444 content::CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT); | 444 content::CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT); |
445 if (!context_) | 445 if (!context_) |
446 return; | 446 return; |
447 | 447 |
448 if (!InitContext()) { | 448 if (!InitContext()) { |
449 DestroyContext(context_, program_, buffer_); | 449 DestroyContext(context_, program_, buffer_); |
450 context_ = NULL; | 450 context_ = NULL; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 WebGraphicsContext3DCommandBufferImpl* | 572 WebGraphicsContext3DCommandBufferImpl* |
573 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { | 573 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { |
574 if (!context_) { | 574 if (!context_) { |
575 CreateContext(); | 575 CreateContext(); |
576 } | 576 } |
577 if (!context_) | 577 if (!context_) |
578 return NULL; | 578 return NULL; |
579 return context_; | 579 return context_; |
580 } | 580 } |
OLD | NEW |