[M108 Migration][VD] Avoid pending frame counter becoming negative
[platform/framework/web/chromium-efl.git] / cc / tiles / image_decode_cache.cc
1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/tiles/image_decode_cache.h"
6
7 #include "cc/raster/tile_task.h"
8
9 namespace cc {
10
11 ImageDecodeCache::TaskResult::TaskResult(
12     bool need_unref,
13     bool is_at_raster_decode,
14     bool can_do_hardware_accelerated_decode)
15     : need_unref(need_unref),
16       is_at_raster_decode(is_at_raster_decode),
17       can_do_hardware_accelerated_decode(can_do_hardware_accelerated_decode) {}
18
19 ImageDecodeCache::TaskResult::TaskResult(
20     scoped_refptr<TileTask> task,
21     bool can_do_hardware_accelerated_decode)
22     : task(std::move(task)),
23       need_unref(true),
24       is_at_raster_decode(false),
25       can_do_hardware_accelerated_decode(can_do_hardware_accelerated_decode) {
26   DCHECK(this->task);
27 }
28
29 ImageDecodeCache::TaskResult::TaskResult(const TaskResult& result) = default;
30
31 ImageDecodeCache::TaskResult::~TaskResult() = default;
32
33 }  // namespace cc