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

Unified 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, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/ca_layer_partial_damage_tree_mac.h
diff --git a/content/common/gpu/ca_layer_partial_damage_tree_mac.h b/content/common/gpu/ca_layer_partial_damage_tree_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..5808545885220c3cc02beb4770729fd1275e1798
--- /dev/null
+++ b/content/common/gpu/ca_layer_partial_damage_tree_mac.h
@@ -0,0 +1,48 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
+#define CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
+
+#include <IOSurface/IOSurface.h>
+#include <QuartzCore/QuartzCore.h>
+#include <deque>
+
+#include "base/mac/scoped_cftyperef.h"
+#include "base/memory/linked_ptr.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/rect_f.h"
+
+namespace content {
+
+class CALayerPartialDamageTree {
+ public:
+ CALayerPartialDamageTree(bool allow_partial_swap,
+ base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
+ const gfx::Rect& pixel_frame_rect);
+ ~CALayerPartialDamageTree();
+
+ base::ScopedCFTypeRef<IOSurfaceRef> RootLayerIOSurface();
+ void CommitCALayers(CALayer* superlayer,
+ scoped_ptr<CALayerPartialDamageTree> old_tree,
+ float scale_factor,
+ const gfx::Rect& pixel_damage_rect);
+
+ private:
+ class OverlayPlane;
+
+ void UpdateRootAndPartialDamagePlanes(CALayerPartialDamageTree* old_tree,
+ const gfx::RectF& pixel_damage_rect);
+ void UpdateRootAndPartialDamageCALayers(CALayer* superlayer,
+ float scale_factor);
+
+ const bool allow_partial_swap_;
+ linked_ptr<OverlayPlane> root_plane_;
+ std::deque<linked_ptr<OverlayPlane>> partial_damage_planes_;
+};
+
+} // content
+
+#endif // CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
« 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