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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 293293002: Updating calls to offscreen buffers to use a size of (0,0) when they do not require an actual buffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <dwmapi.h> 8 #include <dwmapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 child_thread->StopWatchdog(); 376 child_thread->StopWatchdog();
377 377
378 return 0; 378 return 0;
379 } 379 }
380 380
381 namespace { 381 namespace {
382 382
383 #if defined(OS_LINUX) 383 #if defined(OS_LINUX)
384 void CreateDummyGlContext() { 384 void CreateDummyGlContext() {
385 scoped_refptr<gfx::GLSurface> surface( 385 scoped_refptr<gfx::GLSurface> surface(
386 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); 386 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size()));
387 if (!surface.get()) { 387 if (!surface.get()) {
388 VLOG(1) << "gfx::GLSurface::CreateOffscreenGLSurface failed"; 388 VLOG(1) << "gfx::GLSurface::CreateOffscreenGLSurface failed";
389 return; 389 return;
390 } 390 }
391 391
392 // On Linux, this is needed to make sure /dev/nvidiactl has 392 // On Linux, this is needed to make sure /dev/nvidiactl has
393 // been opened and its descriptor cached. 393 // been opened and its descriptor cached.
394 scoped_refptr<gfx::GLContext> context(gfx::GLContext::CreateGLContext( 394 scoped_refptr<gfx::GLContext> context(gfx::GLContext::CreateGLContext(
395 NULL, surface.get(), gfx::PreferDiscreteGpu)); 395 NULL, surface.get(), gfx::PreferDiscreteGpu));
396 if (!context.get()) { 396 if (!context.get()) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 return true; 468 return true;
469 } 469 }
470 470
471 return false; 471 return false;
472 } 472 }
473 #endif // defined(OS_WIN) 473 #endif // defined(OS_WIN)
474 474
475 } // namespace. 475 } // namespace.
476 476
477 } // namespace content 477 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698