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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 1800923002: cc: Directly use property trees to calculate clip rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add setting to only calculate and verify in cc_unittest Created 4 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 rects_.push_back(rect); 76 rects_.push_back(rect);
77 } 77 }
78 78
79 std::vector<SkRect> rects_; 79 std::vector<SkRect> rects_;
80 }; 80 };
81 81
82 class PictureLayerImplTestSettings : public GpuRasterizationEnabledSettings { 82 class PictureLayerImplTestSettings : public GpuRasterizationEnabledSettings {
83 public: 83 public:
84 PictureLayerImplTestSettings() { 84 PictureLayerImplTestSettings() {
85 layer_transforms_should_scale_layer_contents = true; 85 layer_transforms_should_scale_layer_contents = true;
86 verify_clip_tree_calculations = true;
86 } 87 }
87 }; 88 };
88 89
89 class NoLowResTilingsSettings : public PictureLayerImplTestSettings {}; 90 class NoLowResTilingsSettings : public PictureLayerImplTestSettings {};
90 91
91 class LowResTilingsSettings : public PictureLayerImplTestSettings { 92 class LowResTilingsSettings : public PictureLayerImplTestSettings {
92 public: 93 public:
93 LowResTilingsSettings() { create_low_res_tiling = true; } 94 LowResTilingsSettings() { create_low_res_tiling = true; }
94 }; 95 };
95 96
(...skipping 4826 matching lines...) Expand 10 before | Expand all | Expand 10 after
4922 // New low res tiling. 4923 // New low res tiling.
4923 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); 4924 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles());
4924 4925
4925 // This tiling will be high res now, it won't contain low res content since it 4926 // This tiling will be high res now, it won't contain low res content since it
4926 // was all destroyed. 4927 // was all destroyed.
4927 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); 4928 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles());
4928 } 4929 }
4929 4930
4930 } // namespace 4931 } // namespace
4931 } // namespace cc 4932 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698