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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1194623003: cc: Remove contents_texture_manager from LayerTreeHost(Impl) and proxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contentstexturemanager: rebase Created 5 years, 6 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 | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 759f86aee63be73ff734ec652684c0886c805108..956cf41d56a3919697ce6a91cfb273530e61bc4c 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -69,17 +69,7 @@ using testing::Mock;
namespace cc {
namespace {
-class LayerTreeHostTest : public LayerTreeTest {
- public:
- LayerTreeHostTest() : contents_texture_manager_(nullptr) {}
-
- void DidInitializeOutputSurface() override {
- contents_texture_manager_ = layer_tree_host()->contents_texture_manager();
- }
-
- protected:
- PrioritizedResourceManager* contents_texture_manager_;
-};
+class LayerTreeHostTest : public LayerTreeTest {};
class LayerTreeHostTestHasImplThreadTest : public LayerTreeHostTest {
public:
@@ -3533,69 +3523,6 @@ class LayerTreeHostTestUpdateLayerInEmptyViewport : public LayerTreeHostTest {
MULTI_THREAD_TEST_F(LayerTreeHostTestUpdateLayerInEmptyViewport);
-class LayerTreeHostTestAbortEvictedTextures : public LayerTreeHostTest {
- public:
- LayerTreeHostTestAbortEvictedTextures()
- : num_will_begin_main_frames_(0), num_impl_commits_(0) {}
-
- protected:
- void SetupTree() override {
- scoped_refptr<SolidColorLayer> root_layer =
- SolidColorLayer::Create(layer_settings());
- root_layer->SetBounds(gfx::Size(200, 200));
- root_layer->SetIsDrawable(true);
- root_layer->CreateRenderSurface();
-
- layer_tree_host()->SetRootLayer(root_layer);
- LayerTreeHostTest::SetupTree();
- }
-
- void BeginTest() override { PostSetNeedsCommitToMainThread(); }
-
- void WillBeginMainFrame() override {
- num_will_begin_main_frames_++;
- switch (num_will_begin_main_frames_) {
- case 2:
- // Send a redraw to the compositor thread. This will (wrongly) be
- // ignored unless aborting resets the texture state.
- layer_tree_host()->SetNeedsRedraw();
- break;
- }
- }
-
- void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
- num_impl_commits_++;
- }
-
- void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
- switch (impl->SourceAnimationFrameNumberForTesting()) {
- case 1:
- // Prevent draws until commit.
- impl->active_tree()->SetContentsTexturesPurged();
- EXPECT_FALSE(impl->CanDraw());
- // Trigger an abortable commit.
- impl->SetNeedsCommit();
- break;
- case 2:
- EndTest();
- break;
- }
- }
-
- void AfterTest() override {
- // Ensure that the commit was truly aborted.
- EXPECT_EQ(2, num_will_begin_main_frames_);
- EXPECT_EQ(1, num_impl_commits_);
- }
-
- private:
- int num_will_begin_main_frames_;
- int num_impl_commits_;
-};
-
-// Commits can only be aborted when using the thread proxy.
-MULTI_THREAD_TEST_F(LayerTreeHostTestAbortEvictedTextures);
-
class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest {
protected:
void InitializeSettings(LayerTreeSettings* settings) override {
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698