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

Unified Diff: ui/accelerated_widget_mac/io_surface_layer.mm

Issue 753933002: MacViews: Move content::AcceleratedWidget to new component, ui/accelerated_widget_mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20141124-MacViews-MoveSoftwareLayerMac-fromcl
Patch Set: gn check Created 6 years, 1 month 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 | « ui/accelerated_widget_mac/io_surface_layer.h ('k') | ui/accelerated_widget_mac/io_surface_texture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accelerated_widget_mac/io_surface_layer.mm
diff --git a/content/browser/compositor/io_surface_layer_mac.mm b/ui/accelerated_widget_mac/io_surface_layer.mm
similarity index 93%
rename from content/browser/compositor/io_surface_layer_mac.mm
rename to ui/accelerated_widget_mac/io_surface_layer.mm
index 2ca9479297656eb1b3d4e8a29be0885dc41d49c0..41e0ab9a0479856fce766e4abcd156b32bd65952 100644
--- a/content/browser/compositor/io_surface_layer_mac.mm
+++ b/ui/accelerated_widget_mac/io_surface_layer.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/accelerated_widget_mac/io_surface_layer.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/accelerated_widget_mac/io_surface_context.h"
+#include "ui/accelerated_widget_mac/io_surface_texture.h"
#include "ui/base/cocoa/animation_utils.h"
-#include "ui/gfx/size_conversions.h"
+#include "ui/gfx/geometry/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];
« no previous file with comments | « ui/accelerated_widget_mac/io_surface_layer.h ('k') | ui/accelerated_widget_mac/io_surface_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698