Home | History | Annotate | Download | only in ddl
      1 /*
      2  * Copyright 2017 Google Inc.
      3  *
      4  * Use of this source code is governed by a BSD-style license that can be
      5  * found in the LICENSE file.
      6  */
      7 
      8 #include "GrDDLGpu.h"
      9 
     10 #include "GrCaps.h"
     11 
     12 sk_sp<GrGpu> GrDDLGpu::Make(GrContext* context, sk_sp<const GrCaps> caps) {
     13     return sk_sp<GrGpu>(new GrDDLGpu(context, std::move(caps)));
     14 }
     15 
     16 
     17 GrGpuRTCommandBuffer* GrDDLGpu::createCommandBuffer(
     18                                             GrRenderTarget* rt, GrSurfaceOrigin origin,
     19                                             const GrGpuRTCommandBuffer::LoadAndStoreInfo&,
     20                                             const GrGpuRTCommandBuffer::StencilLoadAndStoreInfo&) {
     21     SkASSERT(0);
     22     return nullptr;
     23 }
     24 
     25 GrGpuTextureCommandBuffer* GrDDLGpu::createCommandBuffer(GrTexture* texture,
     26                                                          GrSurfaceOrigin origin) {
     27     SkASSERT(0);
     28     return nullptr;
     29 }
     30 
     31 void GrDDLGpu::submitCommandBuffer(const GrGpuRTCommandBuffer* cmdBuffer) {
     32     SkASSERT(0);
     33 }
     34 
     35 GrDDLGpu::GrDDLGpu(GrContext* context, sk_sp<const GrCaps> caps)
     36         : INHERITED(context) {
     37     fCaps = caps;
     38 }
     39 
     40 sk_sp<GrTexture> GrDDLGpu::onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted,
     41                                            const GrMipLevel texels[], int mipLevelCount) {
     42     SkASSERT(0);
     43     return nullptr;
     44 }
     45 
     46 GrBuffer* GrDDLGpu::onCreateBuffer(size_t sizeInBytes, GrBufferType type,
     47                                    GrAccessPattern accessPattern, const void*) {
     48     SkASSERT(0);
     49     return nullptr;
     50 }
     51 
     52 GrStencilAttachment* GrDDLGpu::createStencilAttachmentForRenderTarget(const GrRenderTarget* rt,
     53                                                                       int width,
     54                                                                       int height) {
     55     SkASSERT(0);
     56     return nullptr;
     57 }
     58 
     59 GrBackendTexture GrDDLGpu::createTestingOnlyBackendTexture(void* pixels, int w, int h,
     60                                                            GrPixelConfig config, bool isRT,
     61                                                            GrMipMapped) {
     62     SkASSERT(0);
     63     return GrBackendTexture(); // invalid
     64 }
     65 
     66 bool GrDDLGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const {
     67     SkASSERT(0);
     68     return false;
     69 }
     70 
     71 void GrDDLGpu::deleteTestingOnlyBackendTexture(GrBackendTexture* tex, bool abandonTexture) {
     72     SkASSERT(0);
     73 }
     74