Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrMockSurfaceProxy.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 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#ifndef GrMockSurfaceProxy_DEFINED
9#define GrMockSurfaceProxy_DEFINED
10
12#include "include/core/SkSize.h"
22
23#include <cstddef>
24#include <string_view>
25#include <utility>
26
28class GrSurface;
29
31public:
32 GrMockSurfaceProxy(SkString name, std::string_view label)
35 SkISize::Make(1, 1),
37 skgpu::Budgeted::kNo,
41 label) {
42 SkDEBUGCODE(this->setDebugName(std::move(name)));
43 }
44
45 bool instantiate(GrResourceProvider*) override { return false; }
46 SkDEBUGCODE(void onValidateSurface(const GrSurface*) override {} )
47 size_t onUninstantiatedGpuMemorySize() const override { return 0; }
48
49protected:
50 sk_sp<GrSurface> createSurface(GrResourceProvider*) const override { return nullptr; }
51
52private:
54};
55
56#endif
GrColorType
GrInternalSurfaceFlags
#define SkUNREACHABLE
Definition SkAssert.h:135
SkBackingFit
#define SkDEBUGCODE(...)
Definition SkDebug.h:23
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
sk_sp< GrSurface > createSurface(GrResourceProvider *) const override
LazySurfaceDesc callbackDesc() const override
bool instantiate(GrResourceProvider *) override
GrMockSurfaceProxy(SkString name, std::string_view label)
SkDEBUGCODE(void onValidateSurface(const GrSurface *) override {}) size_t onUninstantiatedGpuMemorySize() const override
const char * name
Definition fuchsia.cc:50
Protected
Definition GpuTypes.h:61