Commit 0ae2b648 authored by ccameron's avatar ccameron Committed by Commit bot

Mac Overlays: Add unittests for CALayerTree

BUG=

Review URL: https://codereview.chromium.org/1711503002

Cr-Commit-Position: refs/heads/master@{#376042}
parent adb04eb7
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "base/mac/scoped_cftyperef.h" #include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsobject.h" #include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h" #include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/transform.h" #include "ui/gfx/transform.h"
...@@ -22,7 +23,7 @@ namespace content { ...@@ -22,7 +23,7 @@ namespace content {
// The CALayerTree will construct a hierarchy of CALayers from a linear list, // The CALayerTree will construct a hierarchy of CALayers from a linear list,
// using the algorithm and structure referenced described in // using the algorithm and structure referenced described in
// https://docs.google.com/document/d/1DtSN9zzvCF44_FQPM7ie01UxGHagQ66zfF5L9HnigQY/edit?usp=sharing // https://docs.google.com/document/d/1DtSN9zzvCF44_FQPM7ie01UxGHagQ66zfF5L9HnigQY/edit?usp=sharing
class CALayerTree { class CONTENT_EXPORT CALayerTree {
public: public:
CALayerTree(); CALayerTree();
......
...@@ -303,7 +303,7 @@ void CALayerTree::ClipAndSortingLayer::CommitToCA( ...@@ -303,7 +303,7 @@ void CALayerTree::ClipAndSortingLayer::CommitToCA(
DCHECK(old_layer->ca_layer); DCHECK(old_layer->ca_layer);
std::swap(ca_layer, old_layer->ca_layer); std::swap(ca_layer, old_layer->ca_layer);
update_is_clipped = old_layer->is_clipped != is_clipped; update_is_clipped = old_layer->is_clipped != is_clipped;
update_clip_rect = old_layer->clip_rect != clip_rect; update_clip_rect = update_is_clipped || old_layer->clip_rect != clip_rect;
} else { } else {
ca_layer.reset([[CALayer alloc] init]); ca_layer.reset([[CALayer alloc] init]);
[ca_layer setAnchorPoint:CGPointZero]; [ca_layer setAnchorPoint:CGPointZero];
......
This diff is collapsed.
...@@ -663,6 +663,7 @@ ...@@ -663,6 +663,7 @@
'common/dwrite_font_platform_win_unittest.cc', 'common/dwrite_font_platform_win_unittest.cc',
'common/fileapi/file_system_util_unittest.cc', 'common/fileapi/file_system_util_unittest.cc',
'common/gpu/client/gpu_memory_buffer_impl_shared_memory_unittest.cc', 'common/gpu/client/gpu_memory_buffer_impl_shared_memory_unittest.cc',
'common/gpu/ca_layer_tree_unittest_mac.mm',
'common/gpu/gpu_channel_manager_unittest.cc', 'common/gpu/gpu_channel_manager_unittest.cc',
'common/gpu/gpu_channel_test_common.cc', 'common/gpu/gpu_channel_test_common.cc',
'common/gpu/gpu_channel_test_common.h', 'common/gpu/gpu_channel_test_common.h',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment