summaryrefslogtreecommitdiff
path: root/chromium/cc/raster/tile_task.cc
blob: d731433c2c0f25d6ec70d5b16b48bb8563b70a31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/raster/tile_task.h"

#include "base/logging.h"

namespace cc {

TileTask::TileTask(bool supports_concurrent_execution)
    : supports_concurrent_execution_(supports_concurrent_execution),
      did_complete_(false) {}

TileTask::TileTask(bool supports_concurrent_execution,
                   TileTask::Vector* dependencies)
    : supports_concurrent_execution_(supports_concurrent_execution),
      dependencies_(std::move(*dependencies)),
      did_complete_(false) {}

TileTask::~TileTask() {
  DCHECK(did_complete_);
}

void TileTask::DidComplete() {
  DCHECK(!did_complete_);
  did_complete_ = true;
}

bool TileTask::HasCompleted() const {
  return did_complete_;
}

}  // namespace cc