Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: cc/tile_manager.cc

Issue 12388095: cc: Merge GatherPixelRefs and AnalyzeInRect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/tile_manager.h" 5 #include "cc/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 tile->content_rect(), 732 tile->content_rect(),
733 tile->contents_scale(), 733 tile->contents_scale(),
734 &managed_tile_state.picture_pile_analysis); 734 &managed_tile_state.picture_pile_analysis);
735 managed_tile_state.picture_pile_analysis.is_cheap_to_raster &= 735 managed_tile_state.picture_pile_analysis.is_cheap_to_raster &=
736 use_cheapness_estimator_; 736 use_cheapness_estimator_;
737 managed_tile_state.picture_pile_analysis.is_solid_color &= 737 managed_tile_state.picture_pile_analysis.is_solid_color &=
738 use_color_estimator_; 738 use_color_estimator_;
739 managed_tile_state.picture_pile_analysis.is_transparent &= 739 managed_tile_state.picture_pile_analysis.is_transparent &=
740 use_color_estimator_; 740 use_color_estimator_;
741 managed_tile_state.picture_pile_analyzed = true; 741 managed_tile_state.picture_pile_analyzed = true;
742 managed_tile_state.need_to_gather_pixel_refs = false;
743 managed_tile_state.pending_pixel_refs.swap(
744 managed_tile_state.picture_pile_analysis.lazy_pixel_refs);
742 } 745 }
743 } 746 }
744 747
745 void TileManager::GatherPixelRefsForTile(Tile* tile) { 748 void TileManager::GatherPixelRefsForTile(Tile* tile) {
746 TRACE_EVENT0("cc", "TileManager::GatherPixelRefsForTile"); 749 TRACE_EVENT0("cc", "TileManager::GatherPixelRefsForTile");
747 ManagedTileState& managed_tile_state = tile->managed_state(); 750 ManagedTileState& managed_tile_state = tile->managed_state();
748 if (managed_tile_state.need_to_gather_pixel_refs) { 751 if (managed_tile_state.need_to_gather_pixel_refs) {
749 base::TimeTicks gather_begin_time; 752 base::TimeTicks gather_begin_time;
750 if (record_rendering_stats_) 753 if (record_rendering_stats_)
751 gather_begin_time = base::TimeTicks::HighResNow(); 754 gather_begin_time = base::TimeTicks::HighResNow();
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 decode_begin_time = base::TimeTicks::HighResNow(); 1103 decode_begin_time = base::TimeTicks::HighResNow();
1101 pixel_ref->Decode(); 1104 pixel_ref->Decode();
1102 if (stats) { 1105 if (stats) {
1103 stats->totalDeferredImageDecodeCount++; 1106 stats->totalDeferredImageDecodeCount++;
1104 stats->totalDeferredImageDecodeTime += 1107 stats->totalDeferredImageDecodeTime +=
1105 base::TimeTicks::HighResNow() - decode_begin_time; 1108 base::TimeTicks::HighResNow() - decode_begin_time;
1106 } 1109 }
1107 } 1110 }
1108 1111
1109 } // namespace cc 1112 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_pile_impl.cc ('k') | skia/ext/analysis_canvas.h » ('j') | skia/ext/analysis_canvas.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698