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
3 // found in the LICENSE file.
5 #include "cc/tiles/raster_tile_priority_queue.h"
7 #include "cc/tiles/raster_tile_priority_queue_all.h"
8 #include "cc/tiles/raster_tile_priority_queue_required.h"
13 scoped_ptr
<RasterTilePriorityQueue
> RasterTilePriorityQueue::Create(
14 const std::vector
<PictureLayerImpl
*>& active_layers
,
15 const std::vector
<PictureLayerImpl
*>& pending_layers
,
16 TreePriority tree_priority
,
20 scoped_ptr
<RasterTilePriorityQueueAll
> queue(
21 new RasterTilePriorityQueueAll
);
22 queue
->Build(active_layers
, pending_layers
, tree_priority
);
25 case Type::REQUIRED_FOR_ACTIVATION
:
26 case Type::REQUIRED_FOR_DRAW
: {
27 scoped_ptr
<RasterTilePriorityQueueRequired
> queue(
28 new RasterTilePriorityQueueRequired
);
29 queue
->Build(active_layers
, pending_layers
, type
);