| OLD | NEW |
| 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/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1734 | 1734 |
| 1735 private: | 1735 private: |
| 1736 EvictionTestLayer() : Layer() {} | 1736 EvictionTestLayer() : Layer() {} |
| 1737 virtual ~EvictionTestLayer() {} | 1737 virtual ~EvictionTestLayer() {} |
| 1738 | 1738 |
| 1739 void CreateTextureIfNeeded() { | 1739 void CreateTextureIfNeeded() { |
| 1740 if (texture_) | 1740 if (texture_) |
| 1741 return; | 1741 return; |
| 1742 texture_ = PrioritizedResource::Create( | 1742 texture_ = PrioritizedResource::Create( |
| 1743 layer_tree_host()->contents_texture_manager()); | 1743 layer_tree_host()->contents_texture_manager()); |
| 1744 texture_->SetDimensions(gfx::Size(10, 10), GL_RGBA); | 1744 texture_->SetDimensions(gfx::Size(10, 10), RGBA_8888); |
| 1745 bitmap_.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); | 1745 bitmap_.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); |
| 1746 } | 1746 } |
| 1747 | 1747 |
| 1748 scoped_ptr<PrioritizedResource> texture_; | 1748 scoped_ptr<PrioritizedResource> texture_; |
| 1749 SkBitmap bitmap_; | 1749 SkBitmap bitmap_; |
| 1750 }; | 1750 }; |
| 1751 | 1751 |
| 1752 class EvictionTestLayerImpl : public LayerImpl { | 1752 class EvictionTestLayerImpl : public LayerImpl { |
| 1753 public: | 1753 public: |
| 1754 static scoped_ptr<EvictionTestLayerImpl> Create(LayerTreeImpl* tree_impl, | 1754 static scoped_ptr<EvictionTestLayerImpl> Create(LayerTreeImpl* tree_impl, |
| (...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4685 scoped_refptr<TestContextProvider> context_provider_; | 4685 scoped_refptr<TestContextProvider> context_provider_; |
| 4686 FakeContentLayerClient client_; | 4686 FakeContentLayerClient client_; |
| 4687 }; | 4687 }; |
| 4688 | 4688 |
| 4689 // Impl-side painting is a multi-threaded compositor feature. | 4689 // Impl-side painting is a multi-threaded compositor feature. |
| 4690 MULTI_THREAD_TEST_F(LayerTreeHostTestMaxTransferBufferUsageBytes); | 4690 MULTI_THREAD_TEST_F(LayerTreeHostTestMaxTransferBufferUsageBytes); |
| 4691 | 4691 |
| 4692 } // namespace | 4692 } // namespace |
| 4693 | 4693 |
| 4694 } // namespace cc | 4694 } // namespace cc |
| OLD | NEW |