2018-03-07 18:01:25 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2018 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ProxyUtils_DEFINED
|
|
|
|
#define ProxyUtils_DEFINED
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "include/private/GrTypesPriv.h"
|
2019-10-21 19:04:52 +00:00
|
|
|
#include "src/gpu/GrImageInfo.h"
|
2019-11-21 21:02:34 +00:00
|
|
|
#include "src/gpu/GrPipeline.h"
|
2019-06-18 13:58:02 +00:00
|
|
|
#include "src/gpu/GrTextureProxy.h"
|
2018-03-07 18:01:25 +00:00
|
|
|
|
2020-07-01 20:09:43 +00:00
|
|
|
class GrDirectContext;
|
2019-11-21 21:02:34 +00:00
|
|
|
class GrProgramInfo;
|
2021-03-30 20:14:37 +00:00
|
|
|
class GrCPixmap;
|
2019-11-21 21:02:34 +00:00
|
|
|
|
2018-03-07 18:01:25 +00:00
|
|
|
namespace sk_gpu_test {
|
|
|
|
|
2021-02-23 15:45:39 +00:00
|
|
|
/** Returns the proxy backing an image if it is texture backed, otherwise nullptr. */
|
|
|
|
GrTextureProxy* GetTextureImageProxy(SkImage*, GrRecordingContext*);
|
|
|
|
|
2018-03-07 18:01:25 +00:00
|
|
|
/** Makes a texture proxy containing the passed in color data. */
|
2020-08-12 18:06:50 +00:00
|
|
|
GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext*,
|
|
|
|
GrRenderable,
|
|
|
|
GrSurfaceOrigin,
|
2021-03-30 20:14:37 +00:00
|
|
|
GrCPixmap pixmap);
|
2018-03-07 18:01:25 +00:00
|
|
|
|
2021-08-11 19:43:50 +00:00
|
|
|
#if SK_GPU_V1
|
2019-11-21 21:02:34 +00:00
|
|
|
GrProgramInfo* CreateProgramInfo(const GrCaps*,
|
|
|
|
SkArenaAlloc*,
|
2020-11-19 18:41:26 +00:00
|
|
|
const GrSurfaceProxyView& writeView,
|
2021-08-26 16:05:11 +00:00
|
|
|
bool usesMSAASurface,
|
2019-11-21 21:02:34 +00:00
|
|
|
GrAppliedClip&&,
|
2021-06-02 15:58:05 +00:00
|
|
|
const GrDstProxyView&,
|
2020-02-28 21:02:40 +00:00
|
|
|
GrGeometryProcessor*,
|
|
|
|
SkBlendMode,
|
2019-11-21 21:02:34 +00:00
|
|
|
GrPrimitiveType,
|
2020-09-11 13:33:54 +00:00
|
|
|
GrXferBarrierFlags renderPassXferBarriers,
|
2020-11-20 15:22:43 +00:00
|
|
|
GrLoadOp colorLoadOp,
|
2019-11-21 21:02:34 +00:00
|
|
|
GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone,
|
|
|
|
const GrUserStencilSettings* stencil =
|
|
|
|
&GrUserStencilSettings::kUnused);
|
2021-08-11 19:43:50 +00:00
|
|
|
#endif
|
2019-11-21 21:02:34 +00:00
|
|
|
|
2018-03-07 18:01:25 +00:00
|
|
|
} // namespace sk_gpu_test
|
|
|
|
|
|
|
|
#endif
|