From db9ee2d202e813bf7595713bf114a25d585f0172 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 8 Feb 2018 14:35:00 -0500 Subject: [PATCH] Remove unused class GrDDLGpu Change-Id: I66c0bb988e187cb6be43b2d2a726023b0bb25b69 Reviewed-on: https://skia-review.googlesource.com/105764 Reviewed-by: Greg Daniel Reviewed-by: Robert Phillips Commit-Queue: Brian Salomon --- gn/gpu.gni | 4 - src/gpu/GrContext.cpp | 1 - src/gpu/ddl/GrDDLGpu.cpp | 73 ---------------- src/gpu/ddl/GrDDLGpu.h | 175 --------------------------------------- 4 files changed, 253 deletions(-) delete mode 100644 src/gpu/ddl/GrDDLGpu.cpp delete mode 100644 src/gpu/ddl/GrDDLGpu.h diff --git a/gn/gpu.gni b/gn/gpu.gni index 16a014a01d..a34e62b6b4 100644 --- a/gn/gpu.gni +++ b/gn/gpu.gni @@ -501,10 +501,6 @@ skia_gpu_sources = [ "$_src/gpu/mock/GrMockStencilAttachment.h", "$_src/gpu/mock/GrMockTexture.h", - # DDL - "$_src/gpu/ddl/GrDDLGpu.cpp", - "$_src/gpu/ddl/GrDDLGpu.h", - # Sk files "$_src/gpu/SkGpuDevice.cpp", "$_src/gpu/SkGpuDevice.h", diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index dce59f367c..f352f24b36 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -41,7 +41,6 @@ #ifdef SK_METAL #include "mtl/GrMtlTrampoline.h" #endif -#include "ddl/GrDDLGpu.h" #ifdef SK_VULKAN #include "vk/GrVkGpu.h" #endif diff --git a/src/gpu/ddl/GrDDLGpu.cpp b/src/gpu/ddl/GrDDLGpu.cpp deleted file mode 100644 index 583b8b2735..0000000000 --- a/src/gpu/ddl/GrDDLGpu.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "GrDDLGpu.h" - -#include "GrCaps.h" - -sk_sp GrDDLGpu::Make(GrContext* context, sk_sp caps) { - return sk_sp(new GrDDLGpu(context, std::move(caps))); -} - - -GrGpuRTCommandBuffer* GrDDLGpu::createCommandBuffer( - GrRenderTarget* rt, GrSurfaceOrigin origin, - const GrGpuRTCommandBuffer::LoadAndStoreInfo&, - const GrGpuRTCommandBuffer::StencilLoadAndStoreInfo&) { - SkASSERT(0); - return nullptr; -} - -GrGpuTextureCommandBuffer* GrDDLGpu::createCommandBuffer(GrTexture* texture, - GrSurfaceOrigin origin) { - SkASSERT(0); - return nullptr; -} - -void GrDDLGpu::submitCommandBuffer(const GrGpuRTCommandBuffer* cmdBuffer) { - SkASSERT(0); -} - -GrDDLGpu::GrDDLGpu(GrContext* context, sk_sp caps) - : INHERITED(context) { - fCaps = caps; -} - -sk_sp GrDDLGpu::onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, - const GrMipLevel texels[], int mipLevelCount) { - SkASSERT(0); - return nullptr; -} - -GrBuffer* GrDDLGpu::onCreateBuffer(size_t sizeInBytes, GrBufferType type, - GrAccessPattern accessPattern, const void*) { - SkASSERT(0); - return nullptr; -} - -GrStencilAttachment* GrDDLGpu::createStencilAttachmentForRenderTarget(const GrRenderTarget* rt, - int width, - int height) { - SkASSERT(0); - return nullptr; -} - -GrBackendTexture GrDDLGpu::createTestingOnlyBackendTexture(void* pixels, int w, int h, - GrPixelConfig config, bool isRT, - GrMipMapped) { - SkASSERT(0); - return GrBackendTexture(); // invalid -} - -bool GrDDLGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const { - SkASSERT(0); - return false; -} - -void GrDDLGpu::deleteTestingOnlyBackendTexture(GrBackendTexture* tex, bool abandonTexture) { - SkASSERT(0); -} diff --git a/src/gpu/ddl/GrDDLGpu.h b/src/gpu/ddl/GrDDLGpu.h deleted file mode 100644 index e1f463f073..0000000000 --- a/src/gpu/ddl/GrDDLGpu.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef GrDDLGpu_DEFINED -#define GrDDLGpu_DEFINED - -#include "GrGpu.h" - -#include "GrRenderTarget.h" -#include "GrSemaphore.h" -#include "GrTexture.h" - -class GrDDLGpu : public GrGpu { -public: - static sk_sp Make(GrContext*, sk_sp); - - ~GrDDLGpu() override {} - - bool onGetReadPixelsInfo(GrSurface* srcSurface, GrSurfaceOrigin srcOrigin, - int readWidth, int readHeight, size_t rowBytes, - GrPixelConfig readConfig, DrawPreference*, - ReadPixelTempDrawInfo*) override { - SkASSERT(0); - return true; - } - - bool onGetWritePixelsInfo(GrSurface* dstSurface, GrSurfaceOrigin dstOrigin, - int width, int height, - GrPixelConfig srcConfig, DrawPreference*, - WritePixelTempDrawInfo*) override { - SkASSERT(0); - return true; - } - - bool onCopySurface(GrSurface* dst, GrSurfaceOrigin dstOrigin, - GrSurface* src, GrSurfaceOrigin srcOrigin, - const SkIRect& srcRect, const SkIPoint& dstPoint) override { - SkASSERT(0); - return true; - } - - void onQueryMultisampleSpecs(GrRenderTarget* rt, GrSurfaceOrigin, const GrStencilSettings&, - int* effectiveSampleCnt, SamplePattern*) override { - SkASSERT(0); - *effectiveSampleCnt = 1; // ?? - } - - GrGpuRTCommandBuffer* createCommandBuffer( - GrRenderTarget*, GrSurfaceOrigin, - const GrGpuRTCommandBuffer::LoadAndStoreInfo&, - const GrGpuRTCommandBuffer::StencilLoadAndStoreInfo&) override; - - GrGpuTextureCommandBuffer* createCommandBuffer(GrTexture*, GrSurfaceOrigin) override; - - GrFence SK_WARN_UNUSED_RESULT insertFence() override { - SkASSERT(0); - return 0; - } - bool waitFence(GrFence, uint64_t) override { - SkASSERT(0); - return true; - } - void deleteFence(GrFence) const override { - SkASSERT(0); - } - - sk_sp SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned) override { - SkASSERT(0); - return nullptr; - } - sk_sp wrapBackendSemaphore(const GrBackendSemaphore& semaphore, - GrResourceProvider::SemaphoreWrapType wrapType, - GrWrapOwnership ownership) override { - SkASSERT(0); - return nullptr; - } - void insertSemaphore(sk_sp semaphore, bool flush) override { - SkASSERT(0); - } - void waitSemaphore(sk_sp semaphore) override { - SkASSERT(0); - } - sk_sp prepareTextureForCrossContextUsage(GrTexture*) override { - SkASSERT(0); - return nullptr; - } - - void submitCommandBuffer(const GrGpuRTCommandBuffer*); - -private: - GrDDLGpu(GrContext* context, sk_sp caps); - - void onResetContext(uint32_t resetBits) override { SkASSERT(0); } - - void xferBarrier(GrRenderTarget*, GrXferBarrierType) override { SkASSERT(0); } - - sk_sp onCreateTexture(const GrSurfaceDesc&, SkBudgeted, - const GrMipLevel texels[], int mipLevelCount) override; - - sk_sp onWrapBackendTexture(const GrBackendTexture&, GrWrapOwnership) override { - SkASSERT(0); - return nullptr; - } - - sk_sp onWrapRenderableBackendTexture(const GrBackendTexture&, - int sampleCnt, - GrWrapOwnership) override { - SkASSERT(0); - return nullptr; - } - - sk_sp onWrapBackendRenderTarget(const GrBackendRenderTarget&) override { - SkASSERT(0); - return nullptr; - } - - sk_sp onWrapBackendTextureAsRenderTarget(const GrBackendTexture&, - int sampleCnt) override { - SkASSERT(0); - return nullptr; - } - - GrBuffer* onCreateBuffer(size_t sizeInBytes, GrBufferType, GrAccessPattern, - const void*) override; - - bool onReadPixels(GrSurface* surface, GrSurfaceOrigin, - int left, int top, int width, int height, - GrPixelConfig, - void* buffer, - size_t rowBytes) override { - SkASSERT(0); - return true; - } - - bool onWritePixels(GrSurface* surface, GrSurfaceOrigin, - int left, int top, int width, int height, - GrPixelConfig config, - const GrMipLevel texels[], int mipLevelCount) override { - SkASSERT(0); - return true; - } - - bool onTransferPixels(GrTexture* texture, - int left, int top, int width, int height, - GrPixelConfig config, GrBuffer* transferBuffer, - size_t offset, size_t rowBytes) override { - SkASSERT(0); - return true; - } - - void onResolveRenderTarget(GrRenderTarget* target, GrSurfaceOrigin) override { - SkASSERT(0); - return; - } - - void onFinishFlush(bool insertedSemaphores) override { SkASSERT(0); } - - GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget*, - int width, - int height) override; - void clearStencil(GrRenderTarget*, int clearValue) override { SkASSERT(0); } - - GrBackendTexture createTestingOnlyBackendTexture(void* pixels, int w, int h, GrPixelConfig, - bool isRT, GrMipMapped) override; - bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override; - void deleteTestingOnlyBackendTexture(GrBackendTexture*, bool abandon = false) override; - - typedef GrGpu INHERITED; -}; - -#endif