aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContext.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-12-07 14:34:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-08 13:41:10 +0000
commitf06c3582677270c741a5e4fb366ec8b5d4ec4c21 (patch)
treebe9fb470ef48933fdd5b6deb18ab3a01d373686b /src/gpu/GrRenderTargetContext.cpp
parent852ca318a16f9c455d2bed3efb2063dff0e4d068 (diff)
Remove instanced rendering
Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4 Reviewed-on: https://skia-review.googlesource.com/82241 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetContext.cpp')
-rw-r--r--src/gpu/GrRenderTargetContext.cpp64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 1f7f6458ae..03d49bc2bb 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -31,7 +31,6 @@
#include "SkShadowUtils.h"
#include "SkSurfacePriv.h"
#include "effects/GrRRectEffect.h"
-#include "instanced/InstancedRendering.h"
#include "ops/GrAtlasTextOp.h"
#include "ops/GrClearOp.h"
#include "ops/GrClearStencilClipOp.h"
@@ -155,7 +154,6 @@ GrRenderTargetContext::GrRenderTargetContext(GrContext* context,
singleOwner)
, fRenderTargetProxy(std::move(rtp))
, fOpList(sk_ref_sp(fRenderTargetProxy->getLastRenderTargetOpList()))
- , fInstancedPipelineInfo(fRenderTargetProxy.get())
, fSurfaceProps(SkSurfacePropsCopyOrDefault(surfaceProps))
, fManagedOpList(managedOpList) {
#ifdef SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
@@ -467,16 +465,6 @@ bool GrRenderTargetContext::drawFilledRect(const GrClip& clip,
return true;
}
- if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
- (!ss || ss->isDisabled(false))) {
- gr_instanced::OpAllocator* oa = this->drawingManager()->instancingAllocator();
- std::unique_ptr<GrDrawOp> op = oa->recordRect(croppedRect, viewMatrix, std::move(paint),
- aa, fInstancedPipelineInfo);
- if (op) {
- this->addDrawOp(clip, std::move(op));
- return true;
- }
- }
GrAAType aaType = this->chooseAAType(aa, GrAllowMixedSamples::kNo);
std::unique_ptr<GrDrawOp> op;
if (GrAAType::kCoverage == aaType) {
@@ -734,16 +722,6 @@ void GrRenderTargetContext::fillRectToRect(const GrClip& clip,
AutoCheckFlush acf(this->drawingManager());
- if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
- gr_instanced::OpAllocator* oa = this->drawingManager()->instancingAllocator();
- std::unique_ptr<GrDrawOp> op(oa->recordRect(croppedRect, viewMatrix, std::move(paint),
- croppedLocalRect, aa, fInstancedPipelineInfo));
- if (op) {
- this->addDrawOp(clip, std::move(op));
- return;
- }
- }
-
GrAAType aaType = this->chooseAAType(aa, GrAllowMixedSamples::kNo);
if (GrAAType::kCoverage != aaType) {
std::unique_ptr<GrDrawOp> op = GrRectOpFactory::MakeNonAAFillWithLocalRect(
@@ -833,16 +811,6 @@ void GrRenderTargetContext::fillRectWithLocalMatrix(const GrClip& clip,
AutoCheckFlush acf(this->drawingManager());
- if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
- gr_instanced::OpAllocator* oa = this->drawingManager()->instancingAllocator();
- std::unique_ptr<GrDrawOp> op(oa->recordRect(croppedRect, viewMatrix, std::move(paint),
- localMatrix, aa, fInstancedPipelineInfo));
- if (op) {
- this->addDrawOp(clip, std::move(op));
- return;
- }
- }
-
GrAAType aaType = this->chooseAAType(aa, GrAllowMixedSamples::kNo);
if (GrAAType::kCoverage != aaType) {
std::unique_ptr<GrDrawOp> op = GrRectOpFactory::MakeNonAAFillWithLocalMatrix(
@@ -949,17 +917,6 @@ void GrRenderTargetContext::drawRRect(const GrClip& origClip,
AutoCheckFlush acf(this->drawingManager());
const SkStrokeRec stroke = style.strokeRec();
- if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
- stroke.isFillStyle()) {
- gr_instanced::OpAllocator* oa = this->drawingManager()->instancingAllocator();
- std::unique_ptr<GrDrawOp> op(
- oa->recordRRect(rrect, viewMatrix, std::move(paint), aa, fInstancedPipelineInfo));
- if (op) {
- this->addDrawOp(*clip, std::move(op));
- return;
- }
- }
-
GrAAType aaType = this->chooseAAType(aa, GrAllowMixedSamples::kNo);
if (GrAAType::kCoverage == aaType) {
const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
@@ -1214,16 +1171,6 @@ bool GrRenderTargetContext::drawFilledDRRect(const GrClip& clip,
SkASSERT(!origInner.isEmpty());
SkASSERT(!origOuter.isEmpty());
- if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
- gr_instanced::OpAllocator* oa = this->drawingManager()->instancingAllocator();
- std::unique_ptr<GrDrawOp> op(oa->recordDRRect(
- origOuter, origInner, viewMatrix, std::move(paint), aa, fInstancedPipelineInfo));
- if (op) {
- this->addDrawOp(clip, std::move(op));
- return true;
- }
- }
-
SkTCopyOnFirstWrite<SkRRect> inner(origInner), outer(origOuter);
GrAAType aaType = this->chooseAAType(aa, GrAllowMixedSamples::kNo);
@@ -1386,17 +1333,6 @@ void GrRenderTargetContext::drawOval(const GrClip& clip,
AutoCheckFlush acf(this->drawingManager());
const SkStrokeRec& stroke = style.strokeRec();
- if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
- stroke.isFillStyle()) {
- gr_instanced::OpAllocator* oa = this->drawingManager()->instancingAllocator();
- std::unique_ptr<GrDrawOp> op(
- oa->recordOval(oval, viewMatrix, std::move(paint), aa, fInstancedPipelineInfo));
- if (op) {
- this->addDrawOp(clip, std::move(op));
- return;
- }
- }
-
GrAAType aaType = this->chooseAAType(aa, GrAllowMixedSamples::kNo);
if (GrAAType::kCoverage == aaType) {
const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();