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

Side by Side Diff: gpu/ipc/service/ca_layer_partial_damage_tree_mac.h

Issue 1901253002: Mac: Towards moving CALayerTree to the browser proc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove BUILD.gn Created 4 years, 8 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
« no previous file with comments | « gpu/ipc/service/OWNERS ('k') | gpu/ipc/service/ca_layer_partial_damage_tree_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
6 #define GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
7
8 #include <IOSurface/IOSurface.h>
9 #include <QuartzCore/QuartzCore.h>
10
11 #include <deque>
12 #include <memory>
13
14 #include "base/mac/scoped_cftyperef.h"
15 #include "ui/gfx/geometry/rect.h"
16 #include "ui/gfx/geometry/rect_f.h"
17
18 namespace gpu {
19
20 class CALayerPartialDamageTree {
21 public:
22 CALayerPartialDamageTree(bool allow_partial_swap,
23 base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
24 const gfx::Rect& pixel_frame_rect);
25 ~CALayerPartialDamageTree();
26
27 base::ScopedCFTypeRef<IOSurfaceRef> RootLayerIOSurface();
28 void CommitCALayers(CALayer* superlayer,
29 std::unique_ptr<CALayerPartialDamageTree> old_tree,
30 float scale_factor,
31 const gfx::Rect& pixel_damage_rect);
32
33 private:
34 class OverlayPlane;
35
36 // This will populate |partial_damage_planes_|, potentially re-using the
37 // CALayers and |partial_damage_planes_| from |old_tree|. After this function
38 // completes, the back() of |partial_damage_planes_| is the plane that will
39 // be updated this frame (and if it is empty, then the root plane will be
40 // updated).
41 void UpdatePartialDamagePlanes(CALayerPartialDamageTree* old_tree,
42 const gfx::Rect& pixel_damage_rect);
43
44 void UpdateRootAndPartialDamagePlanes(
45 std::unique_ptr<CALayerPartialDamageTree> old_tree,
46 const gfx::Rect& pixel_damage_rect);
47
48 void UpdateCALayers(CALayer* superlayer, float scale_factor);
49
50 const bool allow_partial_swap_;
51 std::unique_ptr<OverlayPlane> root_plane_;
52 std::deque<std::unique_ptr<OverlayPlane>> partial_damage_planes_;
53 };
54
55 } // content
56
57 #endif // GPU_IPC_SERVICE_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/OWNERS ('k') | gpu/ipc/service/ca_layer_partial_damage_tree_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698