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

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 5 years 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 return gfx::Rect(test_layer_->bounds()); 1572 return gfx::Rect(test_layer_->bounds());
1573 } 1573 }
1574 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( 1574 scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
1575 PaintingControlSetting picture_control) override { 1575 PaintingControlSetting picture_control) override {
1576 // Set layer opacity to 0. 1576 // Set layer opacity to 0.
1577 if (test_layer_) 1577 if (test_layer_)
1578 test_layer_->SetOpacity(0.f); 1578 test_layer_->SetOpacity(0.f);
1579 1579
1580 // Return a dummy display list. 1580 // Return a dummy display list.
1581 scoped_refptr<DisplayItemList> display_list = 1581 scoped_refptr<DisplayItemList> display_list =
1582 DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings()); 1582 DisplayItemList::Create(DisplayItemListSettings());
1583 return display_list; 1583 return display_list;
1584 } 1584 }
1585 bool FillsBoundsCompletely() const override { return false; } 1585 bool FillsBoundsCompletely() const override { return false; }
1586 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } 1586 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; }
1587 1587
1588 private: 1588 private:
1589 Layer* test_layer_; 1589 Layer* test_layer_;
1590 }; 1590 };
1591 1591
1592 // Layer opacity change during paint should not prevent compositor resources 1592 // Layer opacity change during paint should not prevent compositor resources
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 void set_layer(Layer* layer) { layer_ = layer; } 2177 void set_layer(Layer* layer) { layer_ = layer; }
2178 2178
2179 gfx::Rect PaintableRegion() override { return gfx::Rect(layer_->bounds()); } 2179 gfx::Rect PaintableRegion() override { return gfx::Rect(layer_->bounds()); }
2180 2180
2181 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( 2181 scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
2182 PaintingControlSetting picture_control) override { 2182 PaintingControlSetting picture_control) override {
2183 layer_->SetBounds(gfx::Size(2, 2)); 2183 layer_->SetBounds(gfx::Size(2, 2));
2184 2184
2185 // Return a dummy display list. 2185 // Return a dummy display list.
2186 scoped_refptr<DisplayItemList> display_list = 2186 scoped_refptr<DisplayItemList> display_list =
2187 DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings()); 2187 DisplayItemList::Create(DisplayItemListSettings());
2188 return display_list; 2188 return display_list;
2189 } 2189 }
2190 2190
2191 bool FillsBoundsCompletely() const override { return false; } 2191 bool FillsBoundsCompletely() const override { return false; }
2192 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } 2192 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; }
2193 2193
2194 private: 2194 private:
2195 Layer* layer_; 2195 Layer* layer_;
2196 }; 2196 };
2197 2197
(...skipping 4348 matching lines...) Expand 10 before | Expand all | Expand 10 after
6546 EndTest(); 6546 EndTest();
6547 } 6547 }
6548 6548
6549 void AfterTest() override {} 6549 void AfterTest() override {}
6550 }; 6550 };
6551 6551
6552 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); 6552 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor);
6553 6553
6554 } // namespace 6554 } // namespace
6555 } // namespace cc 6555 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698