OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/raster_tile_priority_queue_all.h" | 5 #include "cc/resources/raster_tile_priority_queue_all.h" |
6 | 6 |
7 #include "cc/resources/tiling_set_raster_queue_all.h" | 7 #include "cc/resources/tiling_set_raster_queue_all.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 if (!active_queue_ || active_queue_->IsEmpty()) | 273 if (!active_queue_ || active_queue_->IsEmpty()) |
274 return PENDING_TREE; | 274 return PENDING_TREE; |
275 if (!pending_queue_ || pending_queue_->IsEmpty()) | 275 if (!pending_queue_ || pending_queue_->IsEmpty()) |
276 return ACTIVE_TREE; | 276 return ACTIVE_TREE; |
277 | 277 |
278 // Now both iterators have tiles, so we have to decide based on tree priority. | 278 // Now both iterators have tiles, so we have to decide based on tree priority. |
279 return HigherPriorityTree(tree_priority, active_queue_.get(), | 279 return HigherPriorityTree(tree_priority, active_queue_.get(), |
280 pending_queue_.get(), nullptr); | 280 pending_queue_.get(), nullptr); |
281 } | 281 } |
282 | 282 |
283 scoped_refptr<base::debug::ConvertableToTraceFormat> | 283 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
284 RasterTilePriorityQueueAll::PairedTilingSetQueue::StateAsValue() const { | 284 RasterTilePriorityQueueAll::PairedTilingSetQueue::StateAsValue() const { |
285 scoped_refptr<base::debug::TracedValue> state = | 285 scoped_refptr<base::trace_event::TracedValue> state = |
286 new base::debug::TracedValue(); | 286 new base::trace_event::TracedValue(); |
287 | 287 |
288 bool active_queue_has_tile = active_queue_ && !active_queue_->IsEmpty(); | 288 bool active_queue_has_tile = active_queue_ && !active_queue_->IsEmpty(); |
289 TilePriority::PriorityBin active_priority_bin = TilePriority::EVENTUALLY; | 289 TilePriority::PriorityBin active_priority_bin = TilePriority::EVENTUALLY; |
290 TilePriority::PriorityBin pending_priority_bin = TilePriority::EVENTUALLY; | 290 TilePriority::PriorityBin pending_priority_bin = TilePriority::EVENTUALLY; |
291 if (active_queue_has_tile) { | 291 if (active_queue_has_tile) { |
292 active_priority_bin = | 292 active_priority_bin = |
293 active_queue_->Top()->priority(ACTIVE_TREE).priority_bin; | 293 active_queue_->Top()->priority(ACTIVE_TREE).priority_bin; |
294 pending_priority_bin = | 294 pending_priority_bin = |
295 active_queue_->Top()->priority(PENDING_TREE).priority_bin; | 295 active_queue_->Top()->priority(PENDING_TREE).priority_bin; |
296 } | 296 } |
(...skipping 16 matching lines...) Expand all Loading... |
313 | 313 |
314 state->BeginDictionary("pending_queue"); | 314 state->BeginDictionary("pending_queue"); |
315 state->SetBoolean("has_tile", active_queue_has_tile); | 315 state->SetBoolean("has_tile", active_queue_has_tile); |
316 state->SetInteger("active_priority_bin", active_priority_bin); | 316 state->SetInteger("active_priority_bin", active_priority_bin); |
317 state->SetInteger("pending_priority_bin", pending_priority_bin); | 317 state->SetInteger("pending_priority_bin", pending_priority_bin); |
318 state->EndDictionary(); | 318 state->EndDictionary(); |
319 return state; | 319 return state; |
320 } | 320 } |
321 | 321 |
322 } // namespace cc | 322 } // namespace cc |
OLD | NEW |