Flutter Engine
The Flutter Engine
GrMockAttachment.h
Go to the documentation of this file.
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#ifndef GrMockAttachment_DEFINED
9#define GrMockAttachment_DEFINED
10
11#include "include/core/SkSize.h"
19
20#include <string_view>
21
23public:
27 int sampleCnt,
28 std::string_view label)
29 : INHERITED(gpu,
32 sampleCnt,
35 label) {
38 }
39
40 GrBackendFormat backendFormat() const override {
42 /*isStencilFormat*/ true);
43 }
44
45private:
46 using INHERITED = GrAttachment;
47};
48
49#endif
#define SkASSERT(cond)
Definition: SkAssert.h:116
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
GrAttachment(GrGpu *gpu, SkISize dimensions, UsageFlags supportedUsages, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, std::string_view label, GrMemoryless memoryless=GrMemoryless::kNo)
Definition: GrAttachment.h:73
UsageFlags supportedUsages() const
Definition: GrAttachment.h:36
static GrBackendFormat MakeMock(GrColorType colorType, SkTextureCompressionType compression, bool isStencilFormat=false)
void registerWithCache(skgpu::Budgeted)
GrMockAttachment(GrMockGpu *gpu, SkISize dimensions, UsageFlags supportedUsages, int sampleCnt, std::string_view label)
GrBackendFormat backendFormat() const override
SkISize dimensions() const
Definition: GrSurface.h:27
Definition: GpuTools.h:21
Mipmapped
Definition: GpuTypes.h:53
Protected
Definition: GpuTypes.h:61
Definition: SkSize.h:16