Flutter Engine
The Flutter Engine
GrContext_Base.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2019 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
9
17
18#include <utility>
19
20enum SkColorType : int;
21
23 : fThreadSafeProxy(std::move(proxy)) {
24}
25
27
30
31 return true;
32}
33
36
38 return fThreadSafeProxy->priv().options();
39}
40
41const GrCaps* GrContext_Base::caps() const { return fThreadSafeProxy->priv().caps(); }
43
45 GrRenderable renderable) const {
46 return fThreadSafeProxy->defaultBackendFormat(skColorType, renderable);
47}
48
51}
52
55}
56
58
59///////////////////////////////////////////////////////////////////////////////////////////////////
61 return this->context()->refCaps();
62}
63
65 const GrContextOptions& options(this->options());
68}
GrBackendApi
Definition: GrTypes.h:95
#define SkASSERT(cond)
Definition: SkAssert.h:116
SkColorType
Definition: SkColorType.h:19
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
SkTextureCompressionType
const GrContextOptions & options() const
GrContext_Base * context()
sk_sp< const GrCaps > refCaps() const
GrContextOptions::ShaderErrorHandler * getShaderErrorHandler() const
Definition: GrCaps.h:57
const GrContextOptions & options() const
sk_sp< const GrCaps > refCaps() const
int maxSurfaceSampleCountForColorType(SkColorType colorType) const
GrBackendFormat compressedBackendFormat(SkTextureCompressionType c) const
GrBackendFormat defaultBackendFormat(SkColorType ct, GrRenderable renderable) const
GrContextThreadSafeProxyPriv priv()
uint32_t contextID() const
const GrCaps * caps() const
SK_API GrBackendApi backend() const
sk_sp< GrContextThreadSafeProxy > threadSafeProxy()
sk_sp< const GrCaps > refCaps() const
GrContext_Base(sk_sp< GrContextThreadSafeProxy >)
~GrContext_Base() override
SK_API GrBackendFormat defaultBackendFormat(SkColorType, GrRenderable) const
SK_API GrBackendFormat compressedBackendFormat(SkTextureCompressionType) const
virtual bool init()
sk_sp< GrContextThreadSafeProxy > fThreadSafeProxy
const GrContextOptions & options() const
SK_API int maxSurfaceSampleCountForColorType(SkColorType colorType) const
ShaderErrorHandler * DefaultShaderErrorHandler()
Renderable
Definition: GpuTypes.h:69
Definition: ref_ptr.h:256
ShaderErrorHandler * fShaderErrorHandler