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

Side by Side Diff: content/common/gpu/image_transport_surface_mac.cc

Issue 12463007: Disable partial swaps for webview guest renderer until we can figure out how to do that properly. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
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/common/gpu/image_transport_surface.h" 5 #include "content/common/gpu/image_transport_surface.h"
6 6
7 #include "base/mac/scoped_cftyperef.h" 7 #include "base/mac/scoped_cftyperef.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/gpu/gpu_messages.h" 9 #include "content/common/gpu/gpu_messages.h"
10 #include "content/common/gpu/texture_image_transport_surface.h" 10 #include "content/common/gpu/texture_image_transport_surface.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 bool g_allow_os_mesa = false; 433 bool g_allow_os_mesa = false;
434 434
435 } // namespace 435 } // namespace
436 436
437 // static 437 // static
438 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface( 438 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
439 GpuChannelManager* manager, 439 GpuChannelManager* manager,
440 GpuCommandBufferStub* stub, 440 GpuCommandBufferStub* stub,
441 const gfx::GLSurfaceHandle& surface_handle) { 441 const gfx::GLSurfaceHandle& surface_handle) {
442 scoped_refptr<gfx::GLSurface> surface; 442 scoped_refptr<gfx::GLSurface> surface;
443 if (surface_handle.transport_type == gfx::TEXTURE_TRANSPORT) { 443 if (surface_handle.transport_type == gfx::TEXTURE_TRANSPORT ||
444 surface_handle.transport_type ==
445 gfx::TEXTURE_TRANSPORT_NO_PARTIAL_SWAP) {
444 surface = new TextureImageTransportSurface(manager, stub, surface_handle); 446 surface = new TextureImageTransportSurface(manager, stub, surface_handle);
445 } else { 447 } else {
446 DCHECK(surface_handle.transport_type == gfx::NATIVE_TRANSPORT); 448 DCHECK(surface_handle.transport_type == gfx::NATIVE_TRANSPORT);
447 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); 449 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
448 450
449 switch (gfx::GetGLImplementation()) { 451 switch (gfx::GetGLImplementation()) {
450 case gfx::kGLImplementationDesktopGL: 452 case gfx::kGLImplementationDesktopGL:
451 case gfx::kGLImplementationAppleGL: 453 case gfx::kGLImplementationAppleGL:
452 if (!io_surface_support) { 454 if (!io_surface_support) {
453 DLOG(WARNING) << "No IOSurface support"; 455 DLOG(WARNING) << "No IOSurface support";
(...skipping 20 matching lines...) Expand all
474 else 476 else
475 return NULL; 477 return NULL;
476 } 478 }
477 479
478 // static 480 // static
479 void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) { 481 void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) {
480 g_allow_os_mesa = allow; 482 g_allow_os_mesa = allow;
481 } 483 }
482 484
483 } // namespace content 485 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698