| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "cc/base/thread.h" | 10 #include "cc/base/thread.h" |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 395 |
| 396 virtual void AfterTest() OVERRIDE {} | 396 virtual void AfterTest() OVERRIDE {} |
| 397 | 397 |
| 398 private: | 398 private: |
| 399 int callback_count_; | 399 int callback_count_; |
| 400 int commit_count_; | 400 int commit_count_; |
| 401 scoped_refptr<Layer> root_; | 401 scoped_refptr<Layer> root_; |
| 402 scoped_refptr<TextureLayer> layer_; | 402 scoped_refptr<TextureLayer> layer_; |
| 403 }; | 403 }; |
| 404 | 404 |
| 405 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerImplWithMailboxThreadedCallback); | 405 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
| 406 TextureLayerImplWithMailboxThreadedCallback); |
| 406 | 407 |
| 407 class TextureLayerImplWithMailboxTest : public TextureLayerTest { | 408 class TextureLayerImplWithMailboxTest : public TextureLayerTest { |
| 408 protected: | 409 protected: |
| 409 TextureLayerImplWithMailboxTest() | 410 TextureLayerImplWithMailboxTest() |
| 410 : fake_client_( | 411 : fake_client_( |
| 411 FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D)) {} | 412 FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D)) {} |
| 412 | 413 |
| 413 virtual void SetUp() { | 414 virtual void SetUp() { |
| 414 TextureLayerTest::SetUp(); | 415 TextureLayerTest::SetUp(); |
| 415 layer_tree_host_.reset(new MockLayerTreeHost(&fake_client_)); | 416 layer_tree_host_.reset(new MockLayerTreeHost(&fake_client_)); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 int commit_count_; | 617 int commit_count_; |
| 617 | 618 |
| 618 // Used only on thread. | 619 // Used only on thread. |
| 619 unsigned expected_used_textures_on_draw_; | 620 unsigned expected_used_textures_on_draw_; |
| 620 | 621 |
| 621 // Used on either thread, protected by lock_. | 622 // Used on either thread, protected by lock_. |
| 622 base::Lock lock_; | 623 base::Lock lock_; |
| 623 unsigned expected_used_textures_on_commit_; | 624 unsigned expected_used_textures_on_commit_; |
| 624 }; | 625 }; |
| 625 | 626 |
| 626 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerClientTest); | 627 // The TextureLayerClient does not use mailboxes, so can't use a delegating |
| 628 // renderer. |
| 629 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TextureLayerClientTest); |
| 627 | 630 |
| 628 } // namespace | 631 } // namespace |
| 629 } // namespace cc | 632 } // namespace cc |
| OLD | NEW |