| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_ | 5 #ifndef UI_ACCELERATED_WIDGET_MAC_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_ |
| 6 #define GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_ | 6 #define UI_ACCELERATED_WIDGET_MAC_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_ |
| 7 | 7 |
| 8 #include <IOSurface/IOSurface.h> | 8 #include <IOSurface/IOSurface.h> |
| 9 #include <QuartzCore/QuartzCore.h> | 9 #include <QuartzCore/QuartzCore.h> |
| 10 | 10 |
| 11 #include <deque> | 11 #include <deque> |
| 12 #include <memory> | 12 #include <memory> |
| 13 | 13 |
| 14 #include "base/mac/scoped_cftyperef.h" | 14 #include "base/mac/scoped_cftyperef.h" |
| 15 #include "ui/accelerated_widget_mac/accelerated_widget_mac_export.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
| 16 #include "ui/gfx/geometry/rect_f.h" | 17 #include "ui/gfx/geometry/rect_f.h" |
| 17 | 18 |
| 18 namespace gpu { | 19 namespace ui { |
| 19 | 20 |
| 20 class CALayerPartialDamageTree { | 21 class ACCELERATED_WIDGET_MAC_EXPORT CALayerPartialDamageTree { |
| 21 public: | 22 public: |
| 22 CALayerPartialDamageTree(bool allow_partial_swap, | 23 CALayerPartialDamageTree(bool allow_partial_swap, |
| 23 base::ScopedCFTypeRef<IOSurfaceRef> io_surface, | 24 base::ScopedCFTypeRef<IOSurfaceRef> io_surface, |
| 24 const gfx::Rect& pixel_frame_rect); | 25 const gfx::Rect& pixel_frame_rect); |
| 25 ~CALayerPartialDamageTree(); | 26 ~CALayerPartialDamageTree(); |
| 26 | 27 |
| 27 base::ScopedCFTypeRef<IOSurfaceRef> RootLayerIOSurface(); | 28 base::ScopedCFTypeRef<IOSurfaceRef> RootLayerIOSurface(); |
| 28 void CommitCALayers(CALayer* superlayer, | 29 void CommitCALayers(CALayer* superlayer, |
| 29 std::unique_ptr<CALayerPartialDamageTree> old_tree, | 30 std::unique_ptr<CALayerPartialDamageTree> old_tree, |
| 30 float scale_factor, | 31 float scale_factor, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 48 void UpdateCALayers(CALayer* superlayer, float scale_factor); | 49 void UpdateCALayers(CALayer* superlayer, float scale_factor); |
| 49 | 50 |
| 50 const bool allow_partial_swap_; | 51 const bool allow_partial_swap_; |
| 51 std::unique_ptr<OverlayPlane> root_plane_; | 52 std::unique_ptr<OverlayPlane> root_plane_; |
| 52 std::deque<std::unique_ptr<OverlayPlane>> partial_damage_planes_; | 53 std::deque<std::unique_ptr<OverlayPlane>> partial_damage_planes_; |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // content | 56 } // content |
| 56 | 57 |
| 57 #endif // GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_ | 58 #endif // GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_ |
| OLD | NEW |