chromium/third_party/skia/src/gpu/ganesh/image/SkImage_GaneshBase.cpp

/*
 * Copyright 2018 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "src/gpu/ganesh/image/SkImage_GaneshBase.h"

#include "include/core/SkAlphaType.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkColorType.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkRect.h"
#include "include/core/SkSize.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTypes.h"
#include "include/gpu/GpuTypes.h"
#include "include/gpu/ganesh/GrBackendSurface.h"
#include "include/gpu/ganesh/GrDirectContext.h"
#include "include/gpu/ganesh/GrRecordingContext.h"
#include "include/gpu/ganesh/GrTypes.h"
#include "include/gpu/ganesh/SkImageGanesh.h"
#include "include/gpu/ganesh/SkSurfaceGanesh.h"
#include "include/private/chromium/GrPromiseImageTexture.h"
#include "include/private/chromium/SkImageChromium.h"
#include "include/private/gpu/ganesh/GrTypesPriv.h"
#include "src/core/SkBitmapCache.h"
#include "src/core/SkColorSpacePriv.h"
#include "src/core/SkImageFilterTypes.h"
#include "src/core/SkImageFilter_Base.h"
#include "src/core/SkImageInfoPriv.h"
#include "src/gpu/RefCntedCallback.h"
#include "src/gpu/SkBackingFit.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrColorInfo.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/GrImageContextPriv.h"
#include "src/gpu/ganesh/GrProxyProvider.h"
#include "src/gpu/ganesh/GrResourceCache.h"
#include "src/gpu/ganesh/GrResourceProvider.h"
#include "src/gpu/ganesh/GrSurface.h"
#include "src/gpu/ganesh/GrSurfaceProxy.h"
#include "src/gpu/ganesh/GrSurfaceProxyView.h"
#include "src/gpu/ganesh/GrTexture.h"
#include "src/gpu/ganesh/GrTextureProxy.h"
#include "src/gpu/ganesh/SurfaceContext.h"
#include "src/gpu/ganesh/image/GrImageUtils.h"
#include "src/gpu/ganesh/image/SkImage_Ganesh.h"
#include "src/image/SkImage_Base.h"

#include <functional>
#include <memory>
#include <utility>

class GrContextThreadSafeProxy;
class SkImageFilter;
struct SkIPoint;

SkImage_GaneshBase::SkImage_GaneshBase(sk_sp<GrImageContext> context,
                                       SkImageInfo info,
                                       uint32_t uniqueID)
        :{}

//////////////////////////////////////////////////////////////////////////////////////////////////

bool SkImage_GaneshBase::ValidateBackendTexture(const GrCaps* caps,
                                                const GrBackendTexture& tex,
                                                GrColorType grCT,
                                                SkColorType ct,
                                                SkAlphaType at,
                                                sk_sp<SkColorSpace> cs) {}

bool SkImage_GaneshBase::ValidateCompressedBackendTexture(const GrCaps* caps,
                                                          const GrBackendTexture& tex,
                                                          SkAlphaType at) {}

//////////////////////////////////////////////////////////////////////////////////////////////////

bool SkImage_GaneshBase::getROPixels(GrDirectContext* dContext,
                                     SkBitmap* dst,
                                     CachingHint chint) const {}

sk_sp<SkImage> SkImage_GaneshBase::makeSubset(GrDirectContext* direct,
                                              const SkIRect& subset) const {}

sk_sp<SkImage> SkImage_GaneshBase::onMakeSubset(GrDirectContext* direct,
                                                const SkIRect& subset) const {}

sk_sp<SkImage> SkImage_GaneshBase::onMakeSubset(skgpu::graphite::Recorder*,
                                                const SkIRect&,
                                                RequiredProperties) const {}

sk_sp<SkImage> SkImage_GaneshBase::makeColorTypeAndColorSpace(skgpu::graphite::Recorder*,
                                                              SkColorType,
                                                              sk_sp<SkColorSpace>,
                                                              RequiredProperties) const {}

sk_sp<SkSurface> SkImage_GaneshBase::onMakeSurface(skgpu::graphite::Recorder*,
                                                   const SkImageInfo& info) const {}

bool SkImage_GaneshBase::onReadPixels(GrDirectContext* dContext,
                                      const SkImageInfo& dstInfo,
                                      void* dstPixels,
                                      size_t dstRB,
                                      int srcX,
                                      int srcY,
                                      CachingHint) const {}

bool SkImage_GaneshBase::isValid(GrRecordingContext* context) const {}

sk_sp<SkImage> SkImage_GaneshBase::makeColorTypeAndColorSpace(GrDirectContext* dContext,
                                                              SkColorType targetColorType,
                                                              sk_sp<SkColorSpace> targetCS) const {}

sk_sp<GrTextureProxy> SkImage_GaneshBase::MakePromiseImageLazyProxy(
        GrContextThreadSafeProxy* tsp,
        SkISize dimensions,
        const GrBackendFormat& backendFormat,
        skgpu::Mipmapped mipmapped,
        SkImages::PromiseImageTextureFulfillProc fulfillProc,
        sk_sp<skgpu::RefCntedCallback> releaseHelper) {}

namespace SkImages {
sk_sp<SkImage> SubsetTextureFrom(GrDirectContext* context,
                                 const SkImage* img,
                                 const SkIRect& subset) {}

sk_sp<SkImage> MakeWithFilter(GrRecordingContext* rContext,
                              sk_sp<SkImage> src,
                              const SkImageFilter* filter,
                              const SkIRect& subset,
                              const SkIRect& clipBounds,
                              SkIRect* outSubset,
                              SkIPoint* offset) {}

GrDirectContext* GetContext(const SkImage* src) {}


} // namespace SkImages