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

Side by Side Diff: content/common/gpu/ca_layer_partial_damage_tree_mac.h

Issue 1647523002: Mac overlays: Move CALayerPartialDamageTree to its own file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | content/common/gpu/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 CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
6 #define CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
7
8 #include <IOSurface/IOSurface.h>
9 #include <QuartzCore/QuartzCore.h>
10 #include <deque>
11
12 #include "base/mac/scoped_cftyperef.h"
13 #include "base/memory/linked_ptr.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "ui/gfx/geometry/rect.h"
16 #include "ui/gfx/geometry/rect_f.h"
17
18 namespace content {
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 scoped_ptr<CALayerPartialDamageTree> old_tree,
30 float scale_factor,
31 const gfx::Rect& pixel_damage_rect);
32
33 private:
34 class OverlayPlane;
35
36 void UpdateRootAndPartialDamagePlanes(CALayerPartialDamageTree* old_tree,
37 const gfx::RectF& pixel_damage_rect);
38 void UpdateRootAndPartialDamageCALayers(CALayer* superlayer,
39 float scale_factor);
40
41 const bool allow_partial_swap_;
42 linked_ptr<OverlayPlane> root_plane_;
43 std::deque<linked_ptr<OverlayPlane>> partial_damage_planes_;
44 };
45
46 } // content
47
48 #endif // CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/ca_layer_partial_damage_tree_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698