aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipeline.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-26 15:48:41 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-26 20:59:00 +0000
commit2890fbfe1400b81e4d6af98d14dfe757fec93650 (patch)
treebbc22dc56d4cdb0b1f6b06740c68738808506f67 /src/gpu/GrPipeline.cpp
parent480c90afc4382d03fa7cda534a702459ace72953 (diff)
Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)
In a future world where GrSurface no longer has an origin it will be useful for the GrPipeline to be holding the GrRenderTargetProxy (which will still have an origin). Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a Reviewed-on: https://skia-review.googlesource.com/26804 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrPipeline.cpp')
-rw-r--r--src/gpu/GrPipeline.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 0483d4289c..c7f131aab2 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -18,11 +18,11 @@
#include "ops/GrOp.h"
void GrPipeline::init(const InitArgs& args) {
- SkASSERT(args.fRenderTarget);
+ SkASSERT(args.fProxy);
SkASSERT(args.fProcessors);
SkASSERT(args.fProcessors->isFinalized());
- fRenderTarget.reset(args.fRenderTarget);
+ fProxy.reset(args.fProxy);
fFlags = args.fFlags;
if (args.fAppliedClip) {
@@ -99,21 +99,21 @@ void GrPipeline::addDependenciesTo(GrOpList* opList, const GrCaps& caps) const {
GrXferBarrierType GrPipeline::xferBarrierType(const GrCaps& caps) const {
if (fDstTextureProxy.get() &&
- fDstTextureProxy.get()->priv().peekTexture() == fRenderTarget.get()->asTexture()) {
+ fDstTextureProxy.get()->priv().peekTexture() == fProxy.get()->priv().peekTexture()) {
return kTexture_GrXferBarrierType;
}
return this->getXferProcessor().xferBarrierType(caps);
}
-GrPipeline::GrPipeline(GrRenderTarget* rt, ScissorState scissorState, SkBlendMode blendmode)
- : fRenderTarget(rt)
- , fScissorState()
- , fWindowRectsState()
- , fUserStencilSettings(&GrUserStencilSettings::kUnused)
- , fFlags()
- , fXferProcessor(GrPorterDuffXPFactory::MakeNoCoverageXP(blendmode))
- , fFragmentProcessors()
- , fNumColorProcessors(0) {
+GrPipeline::GrPipeline(GrRenderTargetProxy* proxy, ScissorState scissorState, SkBlendMode blendmode)
+ : fProxy(proxy)
+ , fScissorState()
+ , fWindowRectsState()
+ , fUserStencilSettings(&GrUserStencilSettings::kUnused)
+ , fFlags()
+ , fXferProcessor(GrPorterDuffXPFactory::MakeNoCoverageXP(blendmode))
+ , fFragmentProcessors()
+ , fNumColorProcessors(0) {
if (ScissorState::kEnabled == scissorState) {
fScissorState.set({0, 0, 0, 0}); // caller will use the DynamicState struct.
}
@@ -124,7 +124,7 @@ GrPipeline::GrPipeline(GrRenderTarget* rt, ScissorState scissorState, SkBlendMod
bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b) {
SkASSERT(&a != &b);
- if (a.getRenderTarget() != b.getRenderTarget() ||
+ if (a.proxy() != b.proxy() ||
a.fFragmentProcessors.count() != b.fFragmentProcessors.count() ||
a.fNumColorProcessors != b.fNumColorProcessors ||
a.fScissorState != b.fScissorState ||