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/tiles/tile_manager.h" | 5 #include "cc/tiles/tile_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 DCHECK_EQ(tile->desired_texture_size().ToString(), | 682 DCHECK_EQ(tile->desired_texture_size().ToString(), |
683 resource->size().ToString()); | 683 resource->size().ToString()); |
684 } else { | 684 } else { |
685 resource = resource_pool_->AcquireResource( | 685 resource = resource_pool_->AcquireResource( |
686 tile->desired_texture_size(), tile_task_runner_->GetResourceFormat()); | 686 tile->desired_texture_size(), tile_task_runner_->GetResourceFormat()); |
687 } | 687 } |
688 const ScopedResource* const_resource = resource.get(); | 688 const ScopedResource* const_resource = resource.get(); |
689 | 689 |
690 // Create and queue all image decode tasks that this tile depends on. | 690 // Create and queue all image decode tasks that this tile depends on. |
691 ImageDecodeTask::Vector decode_tasks; | 691 ImageDecodeTask::Vector decode_tasks; |
692 std::vector<SkPixelRef*> pixel_refs; | 692 std::vector<skia::PositionPixelRef> pixel_refs; |
693 prioritized_tile.raster_source()->GatherPixelRefs( | 693 prioritized_tile.raster_source()->GatherPixelRefs( |
694 tile->content_rect(), tile->contents_scale(), &pixel_refs); | 694 tile->content_rect(), tile->contents_scale(), &pixel_refs); |
695 for (SkPixelRef* pixel_ref : pixel_refs) { | 695 for (const skia::PositionPixelRef& pixel_ref : pixel_refs) { |
696 decode_tasks.push_back(image_decode_controller_.GetTaskForPixelRef( | 696 decode_tasks.push_back(image_decode_controller_.GetTaskForPixelRef( |
697 pixel_ref, tile->layer_id(), prepare_tiles_count_)); | 697 pixel_ref, tile->layer_id(), prepare_tiles_count_)); |
698 } | 698 } |
699 | 699 |
700 return make_scoped_refptr(new RasterTaskImpl( | 700 return make_scoped_refptr(new RasterTaskImpl( |
701 const_resource, prioritized_tile.raster_source(), tile->content_rect(), | 701 const_resource, prioritized_tile.raster_source(), tile->content_rect(), |
702 tile->invalidated_content_rect(), tile->contents_scale(), | 702 tile->invalidated_content_rect(), tile->contents_scale(), |
703 prioritized_tile.priority().resolution, tile->layer_id(), | 703 prioritized_tile.priority().resolution, tile->layer_id(), |
704 prepare_tiles_count_, static_cast<const void*>(tile), tile->id(), | 704 prepare_tiles_count_, static_cast<const void*>(tile), tile->id(), |
705 tile->invalidated_id(), resource_content_id, tile->source_frame_number(), | 705 tile->invalidated_id(), resource_content_id, tile->source_frame_number(), |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 void TileManager::Signals::reset() { | 1004 void TileManager::Signals::reset() { |
1005 ready_to_activate = false; | 1005 ready_to_activate = false; |
1006 did_notify_ready_to_activate = false; | 1006 did_notify_ready_to_activate = false; |
1007 ready_to_draw = false; | 1007 ready_to_draw = false; |
1008 did_notify_ready_to_draw = false; | 1008 did_notify_ready_to_draw = false; |
1009 all_tile_tasks_completed = false; | 1009 all_tile_tasks_completed = false; |
1010 did_notify_all_tile_tasks_completed = false; | 1010 did_notify_all_tile_tasks_completed = false; |
1011 } | 1011 } |
1012 | 1012 |
1013 } // namespace cc | 1013 } // namespace cc |
OLD | NEW |