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

Unified Diff: ui/accelerated_widget_mac/accelerated_widget_mac.h

Issue 2018793002: Mac: Move remote layer use to GpuOutputSurfaceMac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean_up_mac
Patch Set: Created 4 years, 7 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
Index: ui/accelerated_widget_mac/accelerated_widget_mac.h
diff --git a/ui/accelerated_widget_mac/accelerated_widget_mac.h b/ui/accelerated_widget_mac/accelerated_widget_mac.h
index 01bb51071121aa8af8b24b655f18d2f408abc0ae..bf2ad978efd3f981f3c15c7941e395a89a87922b 100644
--- a/ui/accelerated_widget_mac/accelerated_widget_mac.h
+++ b/ui/accelerated_widget_mac/accelerated_widget_mac.h
@@ -77,33 +77,18 @@ class ACCELERATED_WIDGET_MAC_EXPORT AcceleratedWidgetMac {
void GetVSyncParameters(
base::TimeTicks* timebase, base::TimeDelta* interval) const;
- void GotFrame(CAContextID ca_context_id,
- bool fullscreen_low_power_ca_context_valid,
- CAContextID fullscreen_low_power_ca_context_id,
- base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
- const gfx::Size& pixel_size,
- float scale_factor);
-
- private:
- void GotCAContextFrame(CAContextID ca_context_id,
- bool fullscreen_low_power_ca_context_valid,
- CAContextID fullscreen_low_power_ca_context_id,
- const gfx::Size& pixel_size,
- float scale_factor);
-
+ static AcceleratedWidgetMac* Get(gfx::AcceleratedWidget widget);
+ void GotCALayerFrame(
+ base::scoped_nsobject<CALayer> content_layer,
+ bool fullscreen_low_power_layer_valid,
+ base::scoped_nsobject<CALayer> fullscreen_low_power_layer,
+ const gfx::Size& pixel_size,
+ float scale_factor);
void GotIOSurfaceFrame(base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
const gfx::Size& pixel_size,
float scale_factor);
- // Remove a layer from the heirarchy and destroy it. Because the accelerated
- // layer types may be replaced by a layer of the same type, the layer to
- // destroy is parameterized, and, if it is the current layer, the current
- // layer is reset.
- void DestroyCAContextLayer(
- base::scoped_nsobject<CALayerHost> ca_context_layer);
- void DestroyLocalLayer();
- void EnsureLocalLayer();
-
+ private:
// The AcceleratedWidgetMacNSView that is using this as its internals.
AcceleratedWidgetMacNSView* view_;
@@ -123,12 +108,12 @@ class ACCELERATED_WIDGET_MAC_EXPORT AcceleratedWidgetMac {
// behavior.
base::scoped_nsobject<CALayer> flipped_layer_;
- // The accelerated CoreAnimation layers hosted by the GPU process.
- base::scoped_nsobject<CALayerHost> ca_context_layer_;
- base::scoped_nsobject<CALayerHost> fullscreen_low_power_layer_;
+ // A CALayer with content provided by the output surface.
+ base::scoped_nsobject<CALayer> content_layer_;
+ base::scoped_nsobject<CALayer> fullscreen_low_power_layer_;
- // The locally drawn layer, which has its contents set to an IOSurface.
- base::scoped_nsobject<CALayer> local_layer_;
+ // A CALayer that has its content set to an IOSurface.
+ base::scoped_nsobject<CALayer> io_surface_layer_;
// The size in DIP of the last swap received from |compositor_|.
gfx::Size last_swap_size_dip_;
@@ -138,18 +123,6 @@ class ACCELERATED_WIDGET_MAC_EXPORT AcceleratedWidgetMac {
#endif // __OBJC__
-ACCELERATED_WIDGET_MAC_EXPORT
-void AcceleratedWidgetMacGotFrame(
- gfx::AcceleratedWidget widget,
- CAContextID ca_context_id,
- bool fullscreen_low_power_ca_context_valid,
- CAContextID fullscreen_low_power_ca_context_id,
- base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
- const gfx::Size& pixel_size,
- float scale_factor,
- base::TimeTicks* vsync_timebase,
- base::TimeDelta* vsync_interval);
-
} // namespace ui
#endif // UI_ACCELERATED_WIDGET_MAC_ACCELERATED_WIDGET_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698