OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/fake_ui_resource_layer_tree_host_impl.h" | 5 #include "cc/test/fake_ui_resource_layer_tree_host_impl.h" |
6 | 6 |
7 #include "cc/resources/ui_resource_bitmap.h" | 7 #include "cc/resources/ui_resource_bitmap.h" |
8 #include "cc/test/fake_layer_tree_host_impl.h" | 8 #include "cc/test/fake_layer_tree_host_impl.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 | 11 |
12 FakeUIResourceLayerTreeHostImpl::FakeUIResourceLayerTreeHostImpl( | 12 FakeUIResourceLayerTreeHostImpl::FakeUIResourceLayerTreeHostImpl( |
13 Proxy* proxy, | 13 Proxy* proxy, |
14 SharedBitmapManager* manager) | 14 SharedBitmapManager* manager, |
15 : FakeLayerTreeHostImpl(proxy, manager, nullptr) { | 15 TaskGraphRunner* task_graph_runner) |
| 16 : FakeLayerTreeHostImpl(proxy, manager, task_graph_runner) { |
16 } | 17 } |
17 | 18 |
18 FakeUIResourceLayerTreeHostImpl::~FakeUIResourceLayerTreeHostImpl() {} | 19 FakeUIResourceLayerTreeHostImpl::~FakeUIResourceLayerTreeHostImpl() {} |
19 | 20 |
20 void FakeUIResourceLayerTreeHostImpl::CreateUIResource( | 21 void FakeUIResourceLayerTreeHostImpl::CreateUIResource( |
21 UIResourceId uid, | 22 UIResourceId uid, |
22 const UIResourceBitmap& bitmap) { | 23 const UIResourceBitmap& bitmap) { |
23 if (ResourceIdForUIResource(uid)) | 24 if (ResourceIdForUIResource(uid)) |
24 DeleteUIResource(uid); | 25 DeleteUIResource(uid); |
25 | 26 |
(...skipping 22 matching lines...) Expand all Loading... |
48 } | 49 } |
49 | 50 |
50 bool FakeUIResourceLayerTreeHostImpl::IsUIResourceOpaque(UIResourceId uid) | 51 bool FakeUIResourceLayerTreeHostImpl::IsUIResourceOpaque(UIResourceId uid) |
51 const { | 52 const { |
52 UIResourceMap::const_iterator iter = fake_ui_resource_map_.find(uid); | 53 UIResourceMap::const_iterator iter = fake_ui_resource_map_.find(uid); |
53 DCHECK(iter != fake_ui_resource_map_.end()); | 54 DCHECK(iter != fake_ui_resource_map_.end()); |
54 return iter->second.opaque; | 55 return iter->second.opaque; |
55 } | 56 } |
56 | 57 |
57 } // namespace cc | 58 } // namespace cc |
OLD | NEW |