| 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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 private: | 2036 private: |
| 2037 EvictionTestLayer() : Layer() {} | 2037 EvictionTestLayer() : Layer() {} |
| 2038 virtual ~EvictionTestLayer() {} | 2038 virtual ~EvictionTestLayer() {} |
| 2039 | 2039 |
| 2040 void CreateTextureIfNeeded() { | 2040 void CreateTextureIfNeeded() { |
| 2041 if (texture_) | 2041 if (texture_) |
| 2042 return; | 2042 return; |
| 2043 texture_ = PrioritizedResource::Create( | 2043 texture_ = PrioritizedResource::Create( |
| 2044 layer_tree_host()->contents_texture_manager()); | 2044 layer_tree_host()->contents_texture_manager()); |
| 2045 texture_->SetDimensions(gfx::Size(10, 10), RGBA_8888); | 2045 texture_->SetDimensions(gfx::Size(10, 10), RGBA_8888); |
| 2046 bitmap_.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); | 2046 bitmap_.allocN32Pixels(10, 10); |
| 2047 bitmap_.allocPixels(); | |
| 2048 } | 2047 } |
| 2049 | 2048 |
| 2050 scoped_ptr<PrioritizedResource> texture_; | 2049 scoped_ptr<PrioritizedResource> texture_; |
| 2051 SkBitmap bitmap_; | 2050 SkBitmap bitmap_; |
| 2052 }; | 2051 }; |
| 2053 | 2052 |
| 2054 class EvictionTestLayerImpl : public LayerImpl { | 2053 class EvictionTestLayerImpl : public LayerImpl { |
| 2055 public: | 2054 public: |
| 2056 static scoped_ptr<EvictionTestLayerImpl> Create(LayerTreeImpl* tree_impl, | 2055 static scoped_ptr<EvictionTestLayerImpl> Create(LayerTreeImpl* tree_impl, |
| 2057 int id) { | 2056 int id) { |
| (...skipping 3146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5204 } | 5203 } |
| 5205 | 5204 |
| 5206 virtual void AfterTest() OVERRIDE {} | 5205 virtual void AfterTest() OVERRIDE {} |
| 5207 | 5206 |
| 5208 FakeContentLayerClient client_; | 5207 FakeContentLayerClient client_; |
| 5209 }; | 5208 }; |
| 5210 | 5209 |
| 5211 MULTI_THREAD_TEST_F(LayerTreeHostTestGpuRasterizationSetting); | 5210 MULTI_THREAD_TEST_F(LayerTreeHostTestGpuRasterizationSetting); |
| 5212 | 5211 |
| 5213 } // namespace cc | 5212 } // namespace cc |
| OLD | NEW |