Revert "Add private GrContext::compile API"
This reverts commit 0cd68ab14a
.
Reason for revert: unimplement pure virtual
Original change's description:
> Add private GrContext::compile API
>
> Currently this is only implemented for GL.
>
> Bug: skia:9455
> Change-Id: I8f369273b697e80a4bade5dd2283e66df688f0ec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271742
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,robertphillips@google.com
Change-Id: If273a3328cfff759e213e9be02eb63c3725ea0f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272342
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
bd3de19f79
commit
57a3ded673
@ -123,8 +123,6 @@ public:
|
||||
void moveRenderTasksToDDL(SkDeferredDisplayList*);
|
||||
void copyRenderTasksFromDDL(const SkDeferredDisplayList*, GrRenderTargetProxy* newDest);
|
||||
|
||||
void compile(const GrProgramDesc&, const GrProgramInfo&);
|
||||
|
||||
GrContextOptions::PersistentCache* getPersistentCache() { return fContext->fPersistentCache; }
|
||||
GrContextOptions::ShaderErrorHandler* getShaderErrorHandler() const {
|
||||
return fContext->fShaderErrorHandler;
|
||||
|
@ -552,11 +552,6 @@ public:
|
||||
*/
|
||||
virtual void deleteBackendTexture(const GrBackendTexture&) = 0;
|
||||
|
||||
/**
|
||||
* In this case we have a program descriptor and a program info but no render target.
|
||||
*/
|
||||
virtual bool compile(const GrProgramDesc&, const GrProgramInfo&) = 0;
|
||||
|
||||
virtual bool precompileShader(const SkData& key, const SkData& data) { return false; }
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
|
@ -370,10 +370,6 @@ void GrDawnGpu::deleteBackendTexture(const GrBackendTexture& tex) {
|
||||
}
|
||||
}
|
||||
|
||||
bool GrDawnGpu::compile(const GrProgramDesc&, const GrProgramInfo&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
bool GrDawnGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const {
|
||||
GrDawnTextureInfo info;
|
||||
|
@ -53,9 +53,6 @@ public:
|
||||
const BackendTextureData*) override;
|
||||
|
||||
void deleteBackendTexture(const GrBackendTexture&) override;
|
||||
|
||||
bool compile(const GrProgramDesc&, const GrProgramInfo&) override;
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override;
|
||||
|
||||
|
@ -126,11 +126,6 @@ public:
|
||||
const GrRenderTarget* rt, int width, int height, int numStencilSamples) override;
|
||||
void deleteBackendTexture(const GrBackendTexture&) override;
|
||||
|
||||
bool compile(const GrProgramDesc& desc, const GrProgramInfo& programInfo) override {
|
||||
sk_sp<GrGLProgram> tmp = fProgramCache->findOrCreateProgram(desc, programInfo);
|
||||
return SkToBool(tmp);
|
||||
}
|
||||
|
||||
bool precompileShader(const SkData& key, const SkData& data) override {
|
||||
return fProgramCache->precompileShader(key, data);
|
||||
}
|
||||
@ -324,19 +319,11 @@ private:
|
||||
void abandon();
|
||||
void reset();
|
||||
sk_sp<GrGLProgram> findOrCreateProgram(GrRenderTarget*, const GrProgramInfo&);
|
||||
sk_sp<GrGLProgram> findOrCreateProgram(const GrProgramDesc& desc,
|
||||
const GrProgramInfo& programInfo) {
|
||||
return this->findOrCreateProgram(nullptr, desc, programInfo);
|
||||
}
|
||||
bool precompileShader(const SkData& key, const SkData& data);
|
||||
|
||||
private:
|
||||
struct Entry;
|
||||
|
||||
sk_sp<GrGLProgram> findOrCreateProgram(GrRenderTarget*,
|
||||
const GrProgramDesc&,
|
||||
const GrProgramInfo&);
|
||||
|
||||
struct DescHash {
|
||||
uint32_t operator()(const GrProgramDesc& desc) const {
|
||||
return SkOpts::hash_fn(desc.asKey(), desc.keyLength(), 0);
|
||||
|
@ -55,12 +55,6 @@ sk_sp<GrGLProgram> GrGLGpu::ProgramCache::findOrCreateProgram(GrRenderTarget* re
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return this->findOrCreateProgram(renderTarget, desc, programInfo);
|
||||
}
|
||||
|
||||
sk_sp<GrGLProgram> GrGLGpu::ProgramCache::findOrCreateProgram(GrRenderTarget* renderTarget,
|
||||
const GrProgramDesc& desc,
|
||||
const GrProgramInfo& programInfo) {
|
||||
std::unique_ptr<Entry>* entry = fMap.find(desc);
|
||||
if (entry && !(*entry)->fProgram) {
|
||||
// We've pre-compiled the GL program, but don't have the GrGLProgram scaffolding
|
||||
|
@ -153,8 +153,6 @@ private:
|
||||
const BackendTextureData*) override;
|
||||
void deleteBackendTexture(const GrBackendTexture&) override;
|
||||
|
||||
bool compile(const GrProgramDesc&, const GrProgramInfo&) override { return false; }
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override;
|
||||
|
||||
|
@ -59,8 +59,6 @@ public:
|
||||
|
||||
void deleteBackendTexture(const GrBackendTexture&) override;
|
||||
|
||||
bool compile(const GrProgramDesc&, const GrProgramInfo&) override;
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override;
|
||||
|
||||
|
@ -1009,10 +1009,6 @@ void GrMtlGpu::deleteBackendTexture(const GrBackendTexture& tex) {
|
||||
// Nothing to do here, will get cleaned up when the GrBackendTexture object goes away
|
||||
}
|
||||
|
||||
bool GrMtlGpu::compile(const GrProgramDesc&, const GrProgramInfo&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
bool GrMtlGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const {
|
||||
SkASSERT(GrBackendApi::kMetal == tex.backend());
|
||||
|
@ -2006,10 +2006,6 @@ void GrVkGpu::deleteBackendTexture(const GrBackendTexture& tex) {
|
||||
}
|
||||
}
|
||||
|
||||
bool GrVkGpu::compile(const GrProgramDesc&, const GrProgramInfo&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
bool GrVkGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const {
|
||||
SkASSERT(GrBackendApi::kVulkan == tex.fBackend);
|
||||
|
@ -75,9 +75,6 @@ public:
|
||||
void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {}
|
||||
|
||||
void deleteBackendTexture(const GrBackendTexture&) override;
|
||||
|
||||
bool compile(const GrProgramDesc&, const GrProgramInfo&) override;
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override;
|
||||
|
||||
|
@ -89,14 +89,6 @@ GrVkPipelineState* GrVkResourceProvider::PipelineStateCache::findOrCreatePipelin
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return this->findOrCreatePipeline(renderTarget, desc, programInfo, compatibleRenderPass);
|
||||
}
|
||||
|
||||
GrVkPipelineState* GrVkResourceProvider::PipelineStateCache::findOrCreatePipeline(
|
||||
GrRenderTarget* renderTarget,
|
||||
const GrProgramDesc& desc,
|
||||
const GrProgramInfo& programInfo,
|
||||
VkRenderPass compatibleRenderPass) {
|
||||
std::unique_ptr<Entry>* entry = fMap.find(desc);
|
||||
if (!entry) {
|
||||
#ifdef GR_PIPELINE_STATE_CACHE_STATS
|
||||
|
@ -191,11 +191,6 @@ private:
|
||||
private:
|
||||
struct Entry;
|
||||
|
||||
GrVkPipelineState* findOrCreatePipeline(GrRenderTarget*,
|
||||
const GrProgramDesc&,
|
||||
const GrProgramInfo&,
|
||||
VkRenderPass compatibleRenderPass);
|
||||
|
||||
struct DescHash {
|
||||
uint32_t operator()(const GrProgramDesc& desc) const {
|
||||
return SkOpts::hash_fn(desc.asKey(), desc.keyLength(), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user