| 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_picture_layer_impl.h" | 5 #include "cc/test/fake_picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 #include "cc/resources/tile.h" | 8 #include "cc/resources/tile.h" |
| 9 #include "cc/trees/layer_tree_impl.h" | 9 #include "cc/trees/layer_tree_impl.h" |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 return result; | 126 return result; |
| 127 } | 127 } |
| 128 | 128 |
| 129 void FakePictureLayerImpl::SetRasterSourceOnPending( | 129 void FakePictureLayerImpl::SetRasterSourceOnPending( |
| 130 scoped_refptr<RasterSource> raster_source, | 130 scoped_refptr<RasterSource> raster_source, |
| 131 const Region& invalidation) { | 131 const Region& invalidation) { |
| 132 DCHECK(layer_tree_impl()->IsPendingTree()); | 132 DCHECK(layer_tree_impl()->IsPendingTree()); |
| 133 Region invalidation_temp = invalidation; | 133 Region invalidation_temp = invalidation; |
| 134 const PictureLayerTilingSet* pending_set = nullptr; | 134 const PictureLayerTilingSet* pending_set = nullptr; |
| 135 set_gpu_raster_max_texture_size(layer_tree_impl()->device_viewport_size()); |
| 135 UpdateRasterSource(raster_source, &invalidation_temp, pending_set); | 136 UpdateRasterSource(raster_source, &invalidation_temp, pending_set); |
| 136 } | 137 } |
| 137 | 138 |
| 138 void FakePictureLayerImpl::SetIsDrawnRenderSurfaceLayerListMember(bool is) { | 139 void FakePictureLayerImpl::SetIsDrawnRenderSurfaceLayerListMember(bool is) { |
| 139 draw_properties().last_drawn_render_surface_layer_list_id = | 140 draw_properties().last_drawn_render_surface_layer_list_id = |
| 140 is ? layer_tree_impl()->current_render_surface_list_id() | 141 is ? layer_tree_impl()->current_render_surface_list_id() |
| 141 : layer_tree_impl()->current_render_surface_list_id() - 1; | 142 : layer_tree_impl()->current_render_surface_list_id() - 1; |
| 142 } | 143 } |
| 143 | 144 |
| 144 void FakePictureLayerImpl::CreateAllTiles() { | 145 void FakePictureLayerImpl::CreateAllTiles() { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 return CountTilesRequired( | 271 return CountTilesRequired( |
| 271 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); | 272 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); |
| 272 } | 273 } |
| 273 | 274 |
| 274 void FakePictureLayerImpl::ReleaseResources() { | 275 void FakePictureLayerImpl::ReleaseResources() { |
| 275 PictureLayerImpl::ReleaseResources(); | 276 PictureLayerImpl::ReleaseResources(); |
| 276 ++release_resources_count_; | 277 ++release_resources_count_; |
| 277 } | 278 } |
| 278 | 279 |
| 279 } // namespace cc | 280 } // namespace cc |
| OLD | NEW |