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

Unified Diff: ui/accelerated_widget_mac/io_surface_layer.h

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_context.mm ('k') | ui/accelerated_widget_mac/io_surface_layer.mm » ('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.h
diff --git a/content/browser/compositor/io_surface_layer_mac.h b/ui/accelerated_widget_mac/io_surface_layer.h
similarity index 88%
rename from content/browser/compositor/io_surface_layer_mac.h
rename to ui/accelerated_widget_mac/io_surface_layer.h
index 5a218e8f66529e0b94e40ba596d5ea73d3defcfd..ba48ff9d2698408a3827b7edcc30ee4746a86868 100644
--- a/content/browser/compositor/io_surface_layer_mac.h
+++ b/ui/accelerated_widget_mac/io_surface_layer.h
@@ -2,19 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_COMPOSITOR_IO_SURFACE_LAYER_MAC_H_
-#define CONTENT_BROWSER_COMPOSITOR_IO_SURFACE_LAYER_MAC_H_
+#ifndef UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_
+#define UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_
#import <Cocoa/Cocoa.h>
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/ref_counted.h"
#include "base/timer/timer.h"
-#include "ui/gfx/size.h"
+#include "ui/gfx/geometry/size.h"
@class IOSurfaceLayer;
-namespace content {
+namespace ui {
+
class IOSurfaceTexture;
class IOSurfaceContext;
@@ -44,7 +45,7 @@ class IOSurfaceLayerClient {
class IOSurfaceLayerHelper {
public:
IOSurfaceLayerHelper(IOSurfaceLayerClient* client,
- IOSurfaceLayer* layer);
+ IOSurfaceLayer* layer);
~IOSurfaceLayerHelper();
// Called when the IOSurfaceLayer gets a new frame.
@@ -84,7 +85,7 @@ class IOSurfaceLayerHelper {
void TimerFired();
// The client that the owning layer was created with.
- content::IOSurfaceLayerClient* const client_;
+ IOSurfaceLayerClient* const client_;
// The layer that owns this helper.
IOSurfaceLayer* const layer_;
@@ -111,19 +112,20 @@ class IOSurfaceLayerHelper {
base::DelayTimer<IOSurfaceLayerHelper> timer_;
};
-} // namespace content
+} // namespace ui
// The CoreAnimation layer for drawing accelerated content.
@interface IOSurfaceLayer : CAOpenGLLayer {
@private
- scoped_refptr<content::IOSurfaceTexture> iosurface_;
- scoped_refptr<content::IOSurfaceContext> context_;
+ scoped_refptr<ui::IOSurfaceTexture> iosurface_;
+ scoped_refptr<ui::IOSurfaceContext> context_;
- scoped_ptr<content::IOSurfaceLayerHelper> helper_;
+ scoped_ptr<ui::IOSurfaceLayerHelper> helper_;
}
-- (id)initWithClient:(content::IOSurfaceLayerClient*)client
- withScaleFactor:(float)scale_factor;
+- (id)initWithClient:(ui::IOSurfaceLayerClient*)client
+ withScaleFactor:(float)scale_factor
+ needsGLFinishWorkaround:(bool)needs_gl_finish_workaround;
- (bool)gotFrameWithIOSurface:(IOSurfaceID)io_surface_id
withPixelSize:(gfx::Size)pixel_size
@@ -158,4 +160,4 @@ class IOSurfaceLayerHelper {
- (void)endPumpingFrames;
@end
-#endif // CONTENT_BROWSER_COMPOSITOR_IO_SURFACE_LAYER_MAC_H_
+#endif // UI_ACCELERATED_WIDGET_MAC_IO_SURFACE_LAYER_H_
« no previous file with comments | « ui/accelerated_widget_mac/io_surface_context.mm ('k') | ui/accelerated_widget_mac/io_surface_layer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698