| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 RendererGLContext::DEPTH_SIZE, 0, | 348 RendererGLContext::DEPTH_SIZE, 0, |
| 349 RendererGLContext::STENCIL_SIZE, 0, | 349 RendererGLContext::STENCIL_SIZE, 0, |
| 350 RendererGLContext::SAMPLES, 0, | 350 RendererGLContext::SAMPLES, 0, |
| 351 RendererGLContext::SAMPLE_BUFFERS, 0, | 351 RendererGLContext::SAMPLE_BUFFERS, 0, |
| 352 RendererGLContext::SHARE_RESOURCES, 0, | 352 RendererGLContext::SHARE_RESOURCES, 0, |
| 353 RendererGLContext::BIND_GENERATES_RESOURCES, 1, | 353 RendererGLContext::BIND_GENERATES_RESOURCES, 1, |
| 354 RendererGLContext::NONE, | 354 RendererGLContext::NONE, |
| 355 }; | 355 }; |
| 356 context_ = RendererGLContext::CreateViewContext( | 356 context_ = RendererGLContext::CreateViewContext( |
| 357 host, | 357 host, |
| 358 routing_id(), | 358 surface_id(), |
| 359 NULL, | 359 NULL, |
| 360 "GL_OES_packed_depth_stencil GL_OES_depth24", | 360 "GL_OES_packed_depth_stencil GL_OES_depth24", |
| 361 attribs, | 361 attribs, |
| 362 active_url_, | 362 active_url_, |
| 363 gfx::PreferIntegratedGpu); | 363 gfx::PreferIntegratedGpu); |
| 364 if (!context_) | 364 if (!context_) |
| 365 return; | 365 return; |
| 366 | 366 |
| 367 if (!InitContext()) { | 367 if (!InitContext()) { |
| 368 DestroyContext(context_, program_, buffer_); | 368 DestroyContext(context_, program_, buffer_); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 | 518 |
| 519 RendererGLContext* | 519 RendererGLContext* |
| 520 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { | 520 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { |
| 521 if (!context_) { | 521 if (!context_) { |
| 522 CreateContext(); | 522 CreateContext(); |
| 523 } | 523 } |
| 524 if (!context_) | 524 if (!context_) |
| 525 return NULL; | 525 return NULL; |
| 526 return context_; | 526 return context_; |
| 527 } | 527 } |
| OLD | NEW |