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

Side by Side Diff: cc/resources/tile_manager.cc

Issue 16959022: cc: Make tiles that are not required by trees NEVER_BIN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | cc/resources/tile_priority.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/resources/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/json/json_writer.h" 11 #include "base/json/json_writer.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "cc/debug/devtools_instrumentation.h" 14 #include "cc/debug/devtools_instrumentation.h"
15 #include "cc/debug/traced_value.h" 15 #include "cc/debug/traced_value.h"
16 #include "cc/resources/image_raster_worker_pool.h" 16 #include "cc/resources/image_raster_worker_pool.h"
17 #include "cc/resources/pixel_buffer_raster_worker_pool.h" 17 #include "cc/resources/pixel_buffer_raster_worker_pool.h"
18 #include "cc/resources/tile.h" 18 #include "cc/resources/tile.h"
19 #include "third_party/skia/include/core/SkCanvas.h" 19 #include "third_party/skia/include/core/SkCanvas.h"
20 #include "ui/gfx/rect_conversions.h" 20 #include "ui/gfx/rect_conversions.h"
21 21
22 namespace cc { 22 namespace cc {
23 23
24 namespace { 24 namespace {
25 25
26 // Determine bin based on three categories of tiles: things we need now, 26 // Determine bin based on three categories of tiles: things we need now,
27 // things we need soon, and eventually. 27 // things we need soon, and eventually.
28 inline TileManagerBin BinFromTilePriority(const TilePriority& prio, 28 inline TileManagerBin BinFromTilePriority(const TilePriority& prio,
29 TreePriority tree_priority) { 29 TreePriority tree_priority) {
30 if (!prio.required_by_tree)
reveman 2013/06/21 01:59:16 is there a case where this is different than "dist
31 return NEVER_BIN;
32
30 // The amount of time for which we want to have prepainting coverage. 33 // The amount of time for which we want to have prepainting coverage.
31 const float kPrepaintingWindowTimeSeconds = 1.0f; 34 const float kPrepaintingWindowTimeSeconds = 1.0f;
32 const float kBackflingGuardDistancePixels = 314.0f; 35 const float kBackflingGuardDistancePixels = 314.0f;
33 36
34 // Don't let low res tiles be in the now bin unless we're in a mode where 37 // Don't let low res tiles be in the now bin unless we're in a mode where
35 // we're prioritizing checkerboard prevention. 38 // we're prioritizing checkerboard prevention.
36 bool can_be_in_now_bin = tree_priority == SMOOTHNESS_TAKES_PRIORITY || 39 bool can_be_in_now_bin = tree_priority == SMOOTHNESS_TAKES_PRIORITY ||
37 prio.resolution != LOW_RESOLUTION; 40 prio.resolution != LOW_RESOLUTION;
38 41
39 if (can_be_in_now_bin && prio.time_to_visible_in_seconds == 0) 42 if (can_be_in_now_bin && prio.time_to_visible_in_seconds == 0)
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 } 803 }
801 804
802 void TileManager::DidTileTreeBinChange(Tile* tile, 805 void TileManager::DidTileTreeBinChange(Tile* tile,
803 TileManagerBin new_tree_bin, 806 TileManagerBin new_tree_bin,
804 WhichTree tree) { 807 WhichTree tree) {
805 ManagedTileState& mts = tile->managed_state(); 808 ManagedTileState& mts = tile->managed_state();
806 mts.tree_bin[tree] = new_tree_bin; 809 mts.tree_bin[tree] = new_tree_bin;
807 } 810 }
808 811
809 } // namespace cc 812 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile_priority.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698