Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
ganesh
GrCopyRenderTask.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019 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
#ifndef GrCopyRenderTask_DEFINED
9
#define GrCopyRenderTask_DEFINED
10
11
#include "
src/gpu/ganesh/GrRenderTask.h
"
12
#include "
src/gpu/ganesh/GrSamplerState.h
"
13
14
class
GrCopyRenderTask
final :
public
GrRenderTask
{
15
public
:
16
/**
17
* Copies pixels from srcRect in src to dstRect in dst. srcRect and dstRect must both be
18
* contained in their respective surface dimensions; they do not have to have the same size
19
* if the GPU supports scaling and filtering while copying. The src/dst share a common origin.
20
*/
21
static
sk_sp<GrRenderTask>
Make
(
GrDrawingManager
*,
22
sk_sp<GrSurfaceProxy>
dst,
23
SkIRect
dstRect,
24
sk_sp<GrSurfaceProxy>
src,
25
SkIRect
srcRect,
26
GrSamplerState::Filter
filter,
27
GrSurfaceOrigin
);
28
29
private
:
30
GrCopyRenderTask
(
GrDrawingManager
*,
31
sk_sp<GrSurfaceProxy>
dst,
32
SkIRect
dstRect,
33
sk_sp<GrSurfaceProxy>
src,
34
SkIRect
srcRect,
35
GrSamplerState::Filter
filter,
36
GrSurfaceOrigin
);
37
38
void
onMakeSkippable
()
override
{ fSrc.
reset
(); }
39
bool
onIsUsed
(
GrSurfaceProxy
* proxy)
const override
{
return
proxy == fSrc.
get
(); }
40
void
gatherProxyIntervals
(
GrResourceAllocator
*)
const override
;
41
ExpectedOutcome
onMakeClosed
(
GrRecordingContext
*,
SkIRect
* targetUpdateBounds)
override
;
42
bool
onExecute
(
GrOpFlushState
*)
override
;
43
44
#if defined(GR_TEST_UTILS)
45
const
char
*
name
() const final {
return
"Copy"
; }
46
#endif
47
#ifdef SK_DEBUG
48
void
visitProxies_debugOnly(
const
GrVisitProxyFunc
& func)
const override
{
49
func(fSrc.
get
(), skgpu::Mipmapped::kNo);
50
}
51
#endif
52
53
sk_sp<GrSurfaceProxy>
fSrc;
54
SkIRect
fSrcRect;
55
SkIRect
fDstRect;
56
GrSamplerState::Filter
fFilter;
57
GrSurfaceOrigin
fOrigin;
58
};
59
60
#endif
61
GrRenderTask.h
GrSamplerState.h
GrVisitProxyFunc
std::function< void(GrSurfaceProxy *, skgpu::Mipmapped)> GrVisitProxyFunc
Definition
GrTypesPriv.h:942
GrSurfaceOrigin
GrSurfaceOrigin
Definition
GrTypes.h:147
SkFilterMode
SkFilterMode
Definition
SkSamplingOptions.h:16
GrCopyRenderTask
Definition
GrCopyRenderTask.h:14
GrCopyRenderTask::onIsUsed
bool onIsUsed(GrSurfaceProxy *proxy) const override
Definition
GrCopyRenderTask.h:39
GrCopyRenderTask::Make
static sk_sp< GrRenderTask > Make(GrDrawingManager *, sk_sp< GrSurfaceProxy > dst, SkIRect dstRect, sk_sp< GrSurfaceProxy > src, SkIRect srcRect, GrSamplerState::Filter filter, GrSurfaceOrigin)
Definition
GrCopyRenderTask.cpp:15
GrCopyRenderTask::gatherProxyIntervals
void gatherProxyIntervals(GrResourceAllocator *) const override
Definition
GrCopyRenderTask.cpp:53
GrCopyRenderTask::onMakeSkippable
void onMakeSkippable() override
Definition
GrCopyRenderTask.h:38
GrCopyRenderTask::onMakeClosed
ExpectedOutcome onMakeClosed(GrRecordingContext *, SkIRect *targetUpdateBounds) override
Definition
GrCopyRenderTask.cpp:70
GrCopyRenderTask::onExecute
bool onExecute(GrOpFlushState *) override
Definition
GrCopyRenderTask.cpp:81
GrDrawingManager
Definition
GrDrawingManager.h:46
GrOpFlushState
Definition
GrOpFlushState.h:58
GrRecordingContext
Definition
GrRecordingContext.h:42
GrRenderTask
Definition
GrRenderTask.h:31
GrRenderTask::ExpectedOutcome
ExpectedOutcome
Definition
GrRenderTask.h:170
GrResourceAllocator
Definition
GrResourceAllocator.h:78
GrSurfaceProxy
Definition
GrSurfaceProxy.h:49
sk_sp
Definition
SkRefCnt.h:220
sk_sp::get
T * get() const
Definition
SkRefCnt.h:303
sk_sp::reset
void reset(T *ptr=nullptr)
Definition
SkRefCnt.h:310
name
const char * name
Definition
fuchsia.cc:50
SkIRect
Definition
SkRect.h:32
Generated on Fri Apr 26 2024 06:17:03 for Flutter Engine by
1.9.8