aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipelineBuilder.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-02-23 14:44:57 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-23 14:44:58 -0800
commit44701df5ce572ac3cccec785cf52103d3d5d14a5 (patch)
treeb2f3b5465cc8490261163006376c7f7a30b5399e /src/gpu/GrPipelineBuilder.cpp
parent98c251bc7eec5aa236700d9936c740f2744788db (diff)
Move clip off of draw target
Diffstat (limited to 'src/gpu/GrPipelineBuilder.cpp')
-rw-r--r--src/gpu/GrPipelineBuilder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp
index 9117a1fea3..faa20b1066 100644
--- a/src/gpu/GrPipelineBuilder.cpp
+++ b/src/gpu/GrPipelineBuilder.cpp
@@ -32,6 +32,7 @@ GrPipelineBuilder& GrPipelineBuilder::operator=(const GrPipelineBuilder& that) {
fXPFactory.reset(SkRef(that.getXPFactory()));
fColorStages = that.fColorStages;
fCoverageStages = that.fCoverageStages;
+ fClip = that.fClip;
fColorProcInfoValid = that.fColorProcInfoValid;
fCoverageProcInfoValid = that.fCoverageProcInfoValid;
@@ -46,7 +47,7 @@ GrPipelineBuilder& GrPipelineBuilder::operator=(const GrPipelineBuilder& that) {
return *this;
}
-void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt) {
+void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt, const GrClip* clip) {
SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numFragmentStages());
fColorStages.reset();
@@ -69,8 +70,9 @@ void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt) {
fStencilSettings.setDisabled();
fFlagBits = 0;
- // Enable the clip bit
- this->enableState(GrPipelineBuilder::kClip_StateBit);
+ if (clip) {
+ fClip = *clip;
+ }
this->setState(GrPipelineBuilder::kDither_StateBit, paint.isDither());
this->setState(GrPipelineBuilder::kHWAntialias_StateBit, paint.isAntiAlias());