52cb1d059d
At present, only Xfer processors allow reading back from the destination image since they are in charge of blending. However, we'd like to expose the destination color to fragment processors and Runtime Effects in the future. To make this possible, the DstProxyView will need to be accessible outside of Xfer processors. This CL migrates DstProxyView to be a top-level Ganesh class and fixes up the references to it throughout Skia. It's interesting to note that several call sites were already using typedefs to hide the class nesting anyway. Change-Id: I93a294aa097f9319a968503c4f2f7e4f388ff033 Bug: skia:12066 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414899 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
49 lines
1.7 KiB
C++
49 lines
1.7 KiB
C++
/*
|
|
* 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
|
|
|
|
#include "include/private/GrTypesPriv.h"
|
|
#include "src/gpu/GrImageInfo.h"
|
|
#include "src/gpu/GrPipeline.h"
|
|
#include "src/gpu/GrTextureProxy.h"
|
|
|
|
class GrDirectContext;
|
|
class GrProgramInfo;
|
|
class GrCPixmap;
|
|
|
|
namespace sk_gpu_test {
|
|
|
|
/** Returns the proxy backing an image if it is texture backed, otherwise nullptr. */
|
|
GrTextureProxy* GetTextureImageProxy(SkImage*, GrRecordingContext*);
|
|
|
|
/** Makes a texture proxy containing the passed in color data. */
|
|
GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext*,
|
|
GrRenderable,
|
|
GrSurfaceOrigin,
|
|
GrCPixmap pixmap);
|
|
|
|
GrProgramInfo* CreateProgramInfo(const GrCaps*,
|
|
SkArenaAlloc*,
|
|
const GrSurfaceProxyView& writeView,
|
|
GrAppliedClip&&,
|
|
const GrDstProxyView&,
|
|
GrGeometryProcessor*,
|
|
SkBlendMode,
|
|
GrPrimitiveType,
|
|
GrXferBarrierFlags renderPassXferBarriers,
|
|
GrLoadOp colorLoadOp,
|
|
GrPipeline::InputFlags flags = GrPipeline::InputFlags::kNone,
|
|
const GrUserStencilSettings* stencil =
|
|
&GrUserStencilSettings::kUnused);
|
|
|
|
|
|
} // namespace sk_gpu_test
|
|
|
|
#endif
|