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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 227413011: Remove old texture path in TextureLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
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 391f7c083e474a6c40428f4b50e04546b4410b00..8098de4091f150235945f253b43e6286ccc15e29 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -940,67 +940,6 @@ class LayerTreeHostTestCanDrawBlocksDrawing : public LayerTreeHostTest {
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestCanDrawBlocksDrawing);
-// beginLayerWrite should prevent draws from executing until a commit occurs
-class LayerTreeHostTestWriteLayersRedraw : public LayerTreeHostTest {
- public:
- LayerTreeHostTestWriteLayersRedraw() : num_commits_(0), num_draws_(0) {}
-
- virtual void BeginTest() OVERRIDE {
- PostAcquireLayerTextures();
- PostSetNeedsRedrawToMainThread(); // should be inhibited without blocking
- PostSetNeedsCommitToMainThread();
- }
-
- virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
- num_draws_++;
- EXPECT_EQ(num_draws_, num_commits_);
- }
-
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
- num_commits_++;
- EndTest();
- }
-
- virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, num_commits_); }
-
- private:
- int num_commits_;
- int num_draws_;
-};
-
-MULTI_THREAD_TEST_F(LayerTreeHostTestWriteLayersRedraw);
-
-// Verify that when resuming visibility, Requesting layer write permission
-// will not deadlock the main thread even though there are not yet any
-// scheduled redraws. This behavior is critical for reliably surviving tab
-// switching. There are no failure conditions to this test, it just passes
-// by not timing out.
-class LayerTreeHostTestWriteLayersAfterVisible : public LayerTreeHostTest {
- public:
- LayerTreeHostTestWriteLayersAfterVisible() : num_commits_(0) {}
-
- virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
-
- virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
- num_commits_++;
- if (num_commits_ == 2)
- EndTest();
- else if (num_commits_ < 2) {
- PostSetVisibleToMainThread(false);
- PostSetVisibleToMainThread(true);
- PostAcquireLayerTextures();
- PostSetNeedsCommitToMainThread();
- }
- }
-
- virtual void AfterTest() OVERRIDE {}
-
- private:
- int num_commits_;
-};
-
-MULTI_THREAD_TEST_F(LayerTreeHostTestWriteLayersAfterVisible);
-
// A compositeAndReadback while invisible should force a normal commit without
// assertion.
class LayerTreeHostTestCompositeAndReadbackWhileInvisible
@@ -1877,7 +1816,6 @@ class LayerTreeHostTestFinishAllRendering : public LayerTreeHostTest {
return;
once_ = true;
layer_tree_host()->SetNeedsRedraw();
- layer_tree_host()->AcquireLayerTextures();
{
base::AutoLock lock(lock_);
draw_count_ = 0;

Powered by Google App Engine
This is Rietveld 408576698