aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-02-20 09:51:59 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-20 17:19:13 +0000
commit535ba8d2b862a364f7f8009d6e79cd41519f5643 (patch)
tree9a02a366b03b6172d94e01fea18138d755b01b87 /src/gpu/GrGpu.cpp
parentcfac205c5e1d31588ba5da2c7cb551f0d067de09 (diff)
Drop unused support for MSAA sample locations
Bug: skia: Change-Id: I96f0c25732d79c5881e400b121e81c5696a747a6 Reviewed-on: https://skia-review.googlesource.com/107441 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r--src/gpu/GrGpu.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index ff26c799c9..94e35f6fd0 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -36,7 +36,6 @@ GrGpu::GrGpu(GrContext* context)
: fResetTimestamp(kExpiredTimestamp+1)
, fResetBits(kAll_GrBackendState)
, fContext(context) {
- fMultisampleSpecs.emplace_back(0, 0, nullptr); // Index 0 is an invalid unique id.
}
GrGpu::~GrGpu() {}
@@ -451,65 +450,6 @@ void GrGpu::didWriteToSurface(GrSurface* surface, GrSurfaceOrigin origin, const
}
}
-const GrGpu::MultisampleSpecs& GrGpu::queryMultisampleSpecs(const GrPipeline& pipeline) {
- GrRenderTarget* rt = pipeline.renderTarget();
- SkASSERT(rt->numStencilSamples() > 1);
-
- GrStencilSettings stencil;
- if (pipeline.isStencilEnabled()) {
- // TODO: attach stencil and create settings during render target flush.
- SkASSERT(rt->renderTargetPriv().getStencilAttachment());
- stencil.reset(*pipeline.getUserStencil(), pipeline.hasStencilClip(),
- rt->renderTargetPriv().numStencilBits());
- }
-
- int effectiveSampleCnt;
- SkSTArray<16, SkPoint, true> pattern;
- this->onQueryMultisampleSpecs(rt, pipeline.proxy()->origin(), stencil,
- &effectiveSampleCnt, &pattern);
- SkASSERT(effectiveSampleCnt >= rt->numStencilSamples());
-
- uint8_t id;
- if (this->caps()->sampleLocationsSupport()) {
- SkASSERT(pattern.count() == effectiveSampleCnt);
- const auto& insertResult = fMultisampleSpecsIdMap.insert(
- MultisampleSpecsIdMap::value_type(pattern, SkTMin(fMultisampleSpecs.count(), 255)));
- id = insertResult.first->second;
- if (insertResult.second) {
- // This means the insert did not find the pattern in the map already, and therefore an
- // actual insertion took place. (We don't expect to see many unique sample patterns.)
- const SkPoint* sampleLocations = insertResult.first->first.begin();
- SkASSERT(id == fMultisampleSpecs.count());
- fMultisampleSpecs.emplace_back(id, effectiveSampleCnt, sampleLocations);
- }
- } else {
- id = effectiveSampleCnt;
- for (int i = fMultisampleSpecs.count(); i <= id; ++i) {
- fMultisampleSpecs.emplace_back(i, i, nullptr);
- }
- }
- SkASSERT(id > 0);
-
- return fMultisampleSpecs[id];
-}
-
-bool GrGpu::SamplePatternComparator::operator()(const SamplePattern& a,
- const SamplePattern& b) const {
- if (a.count() != b.count()) {
- return a.count() < b.count();
- }
- for (int i = 0; i < a.count(); ++i) {
- // This doesn't have geometric meaning. We just need to define an ordering for std::map.
- if (a[i].x() != b[i].x()) {
- return a[i].x() < b[i].x();
- }
- if (a[i].y() != b[i].y()) {
- return a[i].y() < b[i].y();
- }
- }
- return false; // Equal.
-}
-
GrSemaphoresSubmitted GrGpu::finishFlush(int numSemaphores,
GrBackendSemaphore backendSemaphores[]) {
GrResourceProvider* resourceProvider = fContext->contextPriv().resourceProvider();