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)); |
} |