Coverage Report

Created: 2024-09-14 07:19

/src/skia/src/gpu/graphite/task/SynchronizeToCpuTask.cpp
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2022 Google LLC
3
 *
4
 * Use of this source code is governed by a BSD-style license that can be
5
 * found in the LICENSE file.
6
 */
7
8
#include "src/gpu/graphite/task/SynchronizeToCpuTask.h"
9
10
#include "src/gpu/graphite/Buffer.h"
11
#include "src/gpu/graphite/CommandBuffer.h"
12
13
namespace skgpu::graphite {
14
15
0
sk_sp<SynchronizeToCpuTask> SynchronizeToCpuTask::Make(sk_sp<Buffer> buffer) {
16
0
    return sk_sp<SynchronizeToCpuTask>(new SynchronizeToCpuTask(std::move(buffer)));
17
0
}
18
19
0
SynchronizeToCpuTask::~SynchronizeToCpuTask() {}
20
21
Task::Status SynchronizeToCpuTask::addCommands(Context*,
22
                                               CommandBuffer* commandBuffer,
23
0
                                               ReplayTargetData) {
24
0
    return commandBuffer->synchronizeBufferToCpu(std::move(fBuffer)) ? Status::kSuccess
25
0
                                                                     : Status::kFail;
26
0
}
27
28
}  // namespace skgpu::graphite