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

Unified Diff: content/common/gpu/image_transport_surface_fbo_mac.mm

Issue 464063005: Add a flag to enable remote CoreAnimation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | ui/base/cocoa/remote_layer_api.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface_fbo_mac.mm
diff --git a/content/common/gpu/image_transport_surface_fbo_mac.mm b/content/common/gpu/image_transport_surface_fbo_mac.mm
index c85a492e21abaa630dbf50cd573604d3fe326722..c62205c4700f15e24f91c76a8269f6921db7fd69 100644
--- a/content/common/gpu/image_transport_surface_fbo_mac.mm
+++ b/content/common/gpu/image_transport_surface_fbo_mac.mm
@@ -7,6 +7,7 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/common/gpu/image_transport_surface_calayer_mac.h"
#include "content/common/gpu/image_transport_surface_iosurface_mac.h"
+#include "ui/base/cocoa/remote_layer_api.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
@@ -29,9 +30,10 @@ ImageTransportSurfaceFBO::ImageTransportSurfaceFBO(
made_current_(false),
is_swap_buffers_pending_(false),
did_unschedule_(false) {
- // TODO(ccameron): If the remote layer API is supported on this system,
- // use a CALayerStorageProvider instead of an IOSurfaceStorageProvider.
- storage_provider_.reset(new IOSurfaceStorageProvider(this));
+ if (ui::RemoteLayerAPISupported())
+ storage_provider_.reset(new CALayerStorageProvider(this));
+ else
+ storage_provider_.reset(new IOSurfaceStorageProvider(this));
helper_.reset(new ImageTransportHelper(this, manager, stub, handle));
}
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | ui/base/cocoa/remote_layer_api.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698