Flutter Engine
The Flutter Engine
GrBufferUpdateRenderTask.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
9
13
16 size_t dstOffset) {
18 std::move(dst),
19 dstOffset));
20}
21
22GrBufferUpdateRenderTask::GrBufferUpdateRenderTask(sk_sp<SkData> src,
24 size_t dstOffset)
25 : fSrc(std::move(src))
26 , fDst(std::move(dst))
27 , fDstOffset(dstOffset) {
29}
30
32
33bool GrBufferUpdateRenderTask::onExecute(GrOpFlushState* flushState) {
34 return fDst->updateData(fSrc->data(), fDstOffset, fSrc->size(), /*preserve=*/true);
35}
SkRect fDst
Definition: LatticeOp.cpp:381
~GrBufferUpdateRenderTask() override
static sk_sp< GrRenderTask > Make(sk_sp< SkData > src, sk_sp< GrGpuBuffer > dst, size_t dstOffset)
bool updateData(const void *src, size_t offset, size_t size, bool preserve)
Definition: GrGpuBuffer.cpp:63
void setFlag(uint32_t flag)
Definition: GrRenderTask.h:200
@ kBlocksReordering_Flag
No task can be reordered with respect to this task.
Definition: GrRenderTask.h:194
const void * data() const
Definition: SkData.h:37
size_t size() const
Definition: SkData.h:30
dst
Definition: cp.py:12
Definition: ref_ptr.h:256