Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
graphite
task
ClearBuffersTask.cpp
Go to the documentation of this file.
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/ClearBuffersTask.h
"
9
10
#include "
src/gpu/graphite/CommandBuffer.h
"
11
12
namespace
skgpu::graphite
{
13
14
sk_sp<ClearBuffersTask>
ClearBuffersTask::Make
(
skia_private::TArray<ClearBufferInfo>
clearList) {
15
return
sk_sp<ClearBuffersTask>
(
new
ClearBuffersTask
(std::move(clearList)));
16
}
17
18
ClearBuffersTask::~ClearBuffersTask
(){};
19
20
Task::Status
ClearBuffersTask::addCommands
(
Context
*,
21
CommandBuffer
* commandBuffer,
22
ReplayTargetData
) {
23
bool
result
=
true
;
24
for
(
const
auto
& c : fClearList) {
25
result
&= commandBuffer->
clearBuffer
(c.fBuffer, c.fOffset, c.fSize);
26
}
27
return
result
?
Status::kSuccess
:
Status::kFail
;
28
}
29
30
}
// namespace skgpu::graphite
ClearBuffersTask.h
CommandBuffer.h
sk_sp
Definition:
SkRefCnt.h:220
skgpu::graphite::ClearBuffersTask
Definition:
ClearBuffersTask.h:20
skgpu::graphite::ClearBuffersTask::addCommands
Status addCommands(Context *, CommandBuffer *, ReplayTargetData) override
Definition:
ClearBuffersTask.cpp:20
skgpu::graphite::ClearBuffersTask::Make
static sk_sp< ClearBuffersTask > Make(skia_private::TArray< ClearBufferInfo >)
Definition:
ClearBuffersTask.cpp:14
skgpu::graphite::ClearBuffersTask::~ClearBuffersTask
~ClearBuffersTask() override
Definition:
ClearBuffersTask.cpp:18
skgpu::graphite::CommandBuffer
Definition:
CommandBuffer.h:38
skgpu::graphite::CommandBuffer::clearBuffer
bool clearBuffer(const Buffer *buffer, size_t offset, size_t size)
Definition:
CommandBuffer.cpp:222
skgpu::graphite::Context
Definition:
Context.h:43
skgpu::graphite::Task::Status
Status
Definition:
Task.h:31
skgpu::graphite::Task::Status::kFail
@ kFail
skgpu::graphite::Task::Status::kSuccess
@ kSuccess
skia_private::TArray
Definition:
SkTArray.h:40
result
GAsyncResult * result
Definition:
fl_text_input_plugin.cc:106
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
skgpu::graphite::Task::ReplayTargetData
Definition:
Task.h:26
Generated on Sun Jun 23 2024 21:56:28 for Flutter Engine by
1.9.4