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

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

Issue 1845563005: Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop ref to deleted content_tests_gypi_values.content_unittests_ozone_sources 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 | « content/common/BUILD.gn ('k') | 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/scoped_ptr.h"
14 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/geometry/rect_f.h"
16
17 namespace content {
18
19 class CALayerPartialDamageTree {
20 public:
21 CALayerPartialDamageTree(bool allow_partial_swap,
22 base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
23 const gfx::Rect& pixel_frame_rect);
24 ~CALayerPartialDamageTree();
25
26 base::ScopedCFTypeRef<IOSurfaceRef> RootLayerIOSurface();
27 void CommitCALayers(CALayer* superlayer,
28 scoped_ptr<CALayerPartialDamageTree> old_tree,
29 float scale_factor,
30 const gfx::Rect& pixel_damage_rect);
31
32 private:
33 class OverlayPlane;
34
35 // This will populate |partial_damage_planes_|, potentially re-using the
36 // CALayers and |partial_damage_planes_| from |old_tree|. After this function
37 // completes, the back() of |partial_damage_planes_| is the plane that will
38 // be updated this frame (and if it is empty, then the root plane will be
39 // updated).
40 void UpdatePartialDamagePlanes(CALayerPartialDamageTree* old_tree,
41 const gfx::Rect& pixel_damage_rect);
42
43 void UpdateRootAndPartialDamagePlanes(
44 scoped_ptr<CALayerPartialDamageTree> old_tree,
45 const gfx::Rect& pixel_damage_rect);
46
47 void UpdateCALayers(CALayer* superlayer, float scale_factor);
48
49 const bool allow_partial_swap_;
50 scoped_ptr<OverlayPlane> root_plane_;
51 std::deque<scoped_ptr<OverlayPlane>> partial_damage_planes_;
52 };
53
54 } // content
55
56 #endif // CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
OLDNEW
« no previous file with comments | « content/common/BUILD.gn ('k') | 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