aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetOpList.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2016-10-27 14:47:55 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-27 19:14:09 +0000
commit1105224f9701e57ec5ce0354d6a380b664f5c638 (patch)
tree2b6f3db0bfd99da5e22adabc0da37d9271c8b543 /src/gpu/GrRenderTargetOpList.cpp
parent6e74412a9cf1ffa44271a55b42f18e8a0813a0a2 (diff)
Rename GrDrawContext to GrRenderTargetContext
This is in preparation for GrTextureContext and GrSurfaceContext BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030 Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd Reviewed-on: https://skia-review.googlesource.com/4030 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.cpp')
-rw-r--r--src/gpu/GrRenderTargetOpList.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp
index 3eb047c1a8..9f50d5d89c 100644
--- a/src/gpu/GrRenderTargetOpList.cpp
+++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -10,7 +10,7 @@
#include "GrAppliedClip.h"
#include "GrAuditTrail.h"
#include "GrCaps.h"
-#include "GrDrawContext.h"
+#include "GrRenderTargetContext.h"
#include "GrGpu.h"
#include "GrGpuCommandBuffer.h"
#include "GrPath.h"
@@ -277,14 +277,14 @@ static void batch_bounds(SkRect* bounds, const GrBatch* batch) {
}
void GrRenderTargetOpList::drawBatch(const GrPipelineBuilder& pipelineBuilder,
- GrDrawContext* drawContext,
+ GrRenderTargetContext* renderTargetContext,
const GrClip& clip,
GrDrawBatch* batch) {
// Setup clip
SkRect bounds;
batch_bounds(&bounds, batch);
GrAppliedClip appliedClip(bounds);
- if (!clip.apply(fContext, drawContext, pipelineBuilder.isHWAntialias(),
+ if (!clip.apply(fContext, renderTargetContext, pipelineBuilder.isHWAntialias(),
pipelineBuilder.hasUserStencilSettings(), &appliedClip)) {
return;
}
@@ -297,7 +297,8 @@ void GrRenderTargetOpList::drawBatch(const GrPipelineBuilder& pipelineBuilder,
}
if (pipelineBuilder.hasUserStencilSettings() || appliedClip.hasStencilClip()) {
- if (!fResourceProvider->attachStencilAttachment(drawContext->accessRenderTarget())) {
+ if (!fResourceProvider->attachStencilAttachment(
+ renderTargetContext->accessRenderTarget())) {
SkDebugf("ERROR creating stencil attachment. Draw skipped.\n");
return;
}
@@ -305,15 +306,15 @@ void GrRenderTargetOpList::drawBatch(const GrPipelineBuilder& pipelineBuilder,
GrPipeline::CreateArgs args;
args.fPipelineBuilder = &pipelineBuilder;
- args.fDrawContext = drawContext;
+ args.fRenderTargetContext = renderTargetContext;
args.fCaps = this->caps();
batch->getPipelineOptimizations(&args.fOpts);
if (args.fOpts.fOverrides.fUsePLSDstRead || fClipBatchToBounds) {
GrGLIRect viewport;
viewport.fLeft = 0;
viewport.fBottom = 0;
- viewport.fWidth = drawContext->width();
- viewport.fHeight = drawContext->height();
+ viewport.fWidth = renderTargetContext->width();
+ viewport.fHeight = renderTargetContext->height();
SkIRect ibounds;
ibounds.fLeft = SkTPin(SkScalarFloorToInt(batch->bounds().fLeft), viewport.fLeft,
viewport.fWidth);
@@ -336,7 +337,7 @@ void GrRenderTargetOpList::drawBatch(const GrPipelineBuilder& pipelineBuilder,
args.fScissor = &appliedClip.scissorState();
args.fWindowRectsState = &appliedClip.windowRectsState();
args.fHasStencilClip = appliedClip.hasStencilClip();
- if (!this->setupDstReadIfNecessary(pipelineBuilder, drawContext->accessRenderTarget(),
+ if (!this->setupDstReadIfNecessary(pipelineBuilder, renderTargetContext->accessRenderTarget(),
clip, args.fOpts,
&args.fDstTexture, batch->bounds())) {
return;
@@ -353,7 +354,7 @@ void GrRenderTargetOpList::drawBatch(const GrPipelineBuilder& pipelineBuilder,
this->recordBatch(batch, appliedClip.clippedDrawBounds());
}
-void GrRenderTargetOpList::stencilPath(GrDrawContext* drawContext,
+void GrRenderTargetOpList::stencilPath(GrRenderTargetContext* renderTargetContext,
const GrClip& clip,
bool useHWAA,
const SkMatrix& viewMatrix,
@@ -364,11 +365,11 @@ void GrRenderTargetOpList::stencilPath(GrDrawContext* drawContext,
// FIXME: Use path bounds instead of this WAR once
// https://bugs.chromium.org/p/skia/issues/detail?id=5640 is resolved.
- SkRect bounds = SkRect::MakeIWH(drawContext->width(), drawContext->height());
+ SkRect bounds = SkRect::MakeIWH(renderTargetContext->width(), renderTargetContext->height());
// Setup clip
GrAppliedClip appliedClip(bounds);
- if (!clip.apply(fContext, drawContext, useHWAA, true, &appliedClip)) {
+ if (!clip.apply(fContext, renderTargetContext, useHWAA, true, &appliedClip)) {
return;
}
// TODO: respect fClipBatchToBounds if we ever start computing bounds here.
@@ -378,7 +379,7 @@ void GrRenderTargetOpList::stencilPath(GrDrawContext* drawContext,
SkASSERT(!appliedClip.clipCoverageFragmentProcessor());
GrStencilAttachment* stencilAttachment = fResourceProvider->attachStencilAttachment(
- drawContext->accessRenderTarget());
+ renderTargetContext->accessRenderTarget());
if (!stencilAttachment) {
SkDebugf("ERROR creating stencil attachment. Draw skipped.\n");
return;
@@ -390,7 +391,7 @@ void GrRenderTargetOpList::stencilPath(GrDrawContext* drawContext,
appliedClip.hasStencilClip(),
stencilAttachment->bits(),
appliedClip.scissorState(),
- drawContext->accessRenderTarget(),
+ renderTargetContext->accessRenderTarget(),
path);
this->recordBatch(batch, appliedClip.clippedDrawBounds());
batch->unref();