| Index: ui/compositor/mac/io_surface_layer_mac.mm
|
| diff --git a/content/browser/compositor/io_surface_layer_mac.mm b/ui/compositor/mac/io_surface_layer_mac.mm
|
| similarity index 93%
|
| rename from content/browser/compositor/io_surface_layer_mac.mm
|
| rename to ui/compositor/mac/io_surface_layer_mac.mm
|
| index 2ca9479297656eb1b3d4e8a29be0885dc41d49c0..84c30f27feaa9643546993a729b3b370544d3b13 100644
|
| --- a/content/browser/compositor/io_surface_layer_mac.mm
|
| +++ b/ui/compositor/mac/io_surface_layer_mac.mm
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/browser/compositor/io_surface_layer_mac.h"
|
| +#include "ui/compositor/mac/io_surface_layer_mac.h"
|
|
|
| #include <CoreFoundation/CoreFoundation.h>
|
| #include <OpenGL/CGLIOSurface.h>
|
| @@ -13,16 +13,16 @@
|
| #include "base/debug/trace_event.h"
|
| #include "base/mac/mac_util.h"
|
| #include "base/mac/sdk_forward_declarations.h"
|
| -#include "content/browser/compositor/io_surface_context_mac.h"
|
| -#include "content/browser/compositor/io_surface_texture_mac.h"
|
| #include "ui/base/cocoa/animation_utils.h"
|
| +#include "ui/compositor/mac/io_surface_context_mac.h"
|
| +#include "ui/compositor/mac/io_surface_texture_mac.h"
|
| #include "ui/gfx/size_conversions.h"
|
| #include "ui/gl/gpu_switching_manager.h"
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // IOSurfaceLayerHelper
|
|
|
| -namespace content {
|
| +namespace ui {
|
|
|
| IOSurfaceLayerHelper::IOSurfaceLayerHelper(
|
| IOSurfaceLayerClient* client,
|
| @@ -160,21 +160,22 @@ void IOSurfaceLayerHelper::EndPumpingFrames() {
|
| DisplayIfNeededAndAck();
|
| }
|
|
|
| -} // namespace content
|
| +} // namespace ui
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // IOSurfaceLayer
|
|
|
| @implementation IOSurfaceLayer
|
|
|
| -- (id)initWithClient:(content::IOSurfaceLayerClient*)client
|
| - withScaleFactor:(float)scale_factor {
|
| +- (id)initWithClient:(ui::IOSurfaceLayerClient*)client
|
| + withScaleFactor:(float)scale_factor
|
| + needsGLFinishWorkaround:(bool)needs_gl_finish_workaround {
|
| if (self = [super init]) {
|
| - helper_.reset(new content::IOSurfaceLayerHelper(client, self));
|
| + helper_.reset(new ui::IOSurfaceLayerHelper(client, self));
|
|
|
| - iosurface_ = content::IOSurfaceTexture::Create();
|
| - context_ = content::IOSurfaceContext::Get(
|
| - content::IOSurfaceContext::kCALayerContext);
|
| + iosurface_ = ui::IOSurfaceTexture::Create(needs_gl_finish_workaround);
|
| + context_ = ui::IOSurfaceContext::Get(
|
| + ui::IOSurfaceContext::kCALayerContext);
|
| if (!iosurface_.get() || !context_.get()) {
|
| LOG(ERROR) << "Failed create CompositingIOSurface or context";
|
| [self resetClient];
|
|
|