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

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

Issue 8758017: aura: fix fullscreen pepper flash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/browser/gpu/gpu_process_host_ui_shim.cc ('k') | no next file » | 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 const float kTexCoords[] = { 417 const float kTexCoords[] = {
418 0.f, 0.f, 418 0.f, 0.f,
419 0.f, 2.f, 419 0.f, 2.f,
420 2.f, 0.f, 420 2.f, 0.f,
421 }; 421 };
422 422
423 } // anonymous namespace 423 } // anonymous namespace
424 424
425 bool RenderWidgetFullscreenPepper::InitContext() { 425 bool RenderWidgetFullscreenPepper::InitContext() {
426 gpu::gles2::GLES2Implementation* gl = context_->GetImplementation(); 426 gpu::gles2::GLES2Implementation* gl = context_->GetImplementation();
427 gl->ResizeCHROMIUM(size().width(), size().height());
428 gl->Viewport(0, 0, size().width(), size().height());
429
427 program_ = gl->CreateProgram(); 430 program_ = gl->CreateProgram();
428 431
429 GLuint vertex_shader = 432 GLuint vertex_shader =
430 CreateShaderFromSource(gl, GL_VERTEX_SHADER, kVertexShader); 433 CreateShaderFromSource(gl, GL_VERTEX_SHADER, kVertexShader);
431 if (!vertex_shader) 434 if (!vertex_shader)
432 return false; 435 return false;
433 gl->AttachShader(program_, vertex_shader); 436 gl->AttachShader(program_, vertex_shader);
434 gl->DeleteShader(vertex_shader); 437 gl->DeleteShader(vertex_shader);
435 438
436 GLuint fragment_shader = 439 GLuint fragment_shader =
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 514
512 RendererGLContext* 515 RendererGLContext*
513 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { 516 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() {
514 if (!context_) { 517 if (!context_) {
515 CreateContext(); 518 CreateContext();
516 } 519 }
517 if (!context_) 520 if (!context_)
518 return NULL; 521 return NULL;
519 return context_; 522 return context_;
520 } 523 }
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698