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

Side by Side Diff: ui/accelerated_widget_mac/gl_renderer_layer_tree.h

Issue 1917723002: Move logic from ImageTransportSurfaceOverlayMac into ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix grammar 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 unified diff | Download patch
OLDNEW
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 UI_ACCELERATED_WIDGET_MAC_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_ 5 #ifndef UI_ACCELERATED_WIDGET_MAC_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
6 #define UI_ACCELERATED_WIDGET_MAC_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/accelerated_widget_mac/accelerated_widget_mac_export.h"
16 #include "ui/gfx/geometry/rect.h" 16 #include "ui/gfx/geometry/rect.h"
17 #include "ui/gfx/geometry/rect_f.h" 17 #include "ui/gfx/geometry/rect_f.h"
18 18
19 namespace ui { 19 namespace ui {
20 20
21 class ACCELERATED_WIDGET_MAC_EXPORT CALayerPartialDamageTree { 21 class ACCELERATED_WIDGET_MAC_EXPORT GLRendererLayerTree {
22 public: 22 public:
23 CALayerPartialDamageTree(bool allow_partial_swap, 23 GLRendererLayerTree(bool allow_partial_swap,
24 base::ScopedCFTypeRef<IOSurfaceRef> io_surface, 24 base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
25 const gfx::Rect& pixel_frame_rect); 25 const gfx::Rect& pixel_frame_rect);
26 ~CALayerPartialDamageTree(); 26 ~GLRendererLayerTree();
27 27
28 base::ScopedCFTypeRef<IOSurfaceRef> RootLayerIOSurface(); 28 base::ScopedCFTypeRef<IOSurfaceRef> RootLayerIOSurface();
29 void CommitCALayers(CALayer* superlayer, 29 void CommitCALayers(CALayer* superlayer,
30 std::unique_ptr<CALayerPartialDamageTree> old_tree, 30 std::unique_ptr<GLRendererLayerTree> old_tree,
31 float scale_factor, 31 float scale_factor,
32 const gfx::Rect& pixel_damage_rect); 32 const gfx::Rect& pixel_damage_rect);
33 33
34 private: 34 private:
35 class OverlayPlane; 35 class OverlayPlane;
36 36
37 // This will populate |partial_damage_planes_|, potentially re-using the 37 // This will populate |partial_damage_planes_|, potentially re-using the
38 // CALayers and |partial_damage_planes_| from |old_tree|. After this function 38 // CALayers and |partial_damage_planes_| from |old_tree|. After this function
39 // completes, the back() of |partial_damage_planes_| is the plane that will 39 // completes, the back() of |partial_damage_planes_| is the plane that will
40 // be updated this frame (and if it is empty, then the root plane will be 40 // be updated this frame (and if it is empty, then the root plane will be
41 // updated). 41 // updated).
42 void UpdatePartialDamagePlanes(CALayerPartialDamageTree* old_tree, 42 void UpdatePartialDamagePlanes(GLRendererLayerTree* old_tree,
43 const gfx::Rect& pixel_damage_rect); 43 const gfx::Rect& pixel_damage_rect);
44 44
45 void UpdateRootAndPartialDamagePlanes( 45 void UpdateRootAndPartialDamagePlanes(
46 std::unique_ptr<CALayerPartialDamageTree> old_tree, 46 std::unique_ptr<GLRendererLayerTree> old_tree,
47 const gfx::Rect& pixel_damage_rect); 47 const gfx::Rect& pixel_damage_rect);
48 48
49 void UpdateCALayers(CALayer* superlayer, float scale_factor); 49 void UpdateCALayers(CALayer* superlayer, float scale_factor);
50 50
51 const bool allow_partial_swap_; 51 const bool allow_partial_swap_;
52 std::unique_ptr<OverlayPlane> root_plane_; 52 std::unique_ptr<OverlayPlane> root_plane_;
53 std::deque<std::unique_ptr<OverlayPlane>> partial_damage_planes_; 53 std::deque<std::unique_ptr<OverlayPlane>> partial_damage_planes_;
54 }; 54 };
55 55
56 } // content 56 } // content
57 57
58 #endif // GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_ 58 #endif // GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
OLDNEW
« no previous file with comments | « ui/accelerated_widget_mac/ca_renderer_layer_tree.mm ('k') | ui/accelerated_widget_mac/gl_renderer_layer_tree.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698