Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
GrResourceProviderPriv.h
Go to the documentation of this file.
1
/*
2
* Copyright 2018 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 GrResourceProviderPriv_DEFINED
9
#define GrResourceProviderPriv_DEFINED
10
11
#include "
src/gpu/ganesh/GrResourceProvider.h
"
12
13
/** Class that adds methods to GrResourceProvider that are only intended for use internal to Skia.
14
This class is purely a privileged window into GrResourceProvider. It should never have
15
additional data members or virtual methods. */
16
class
GrResourceProviderPriv
{
17
public
:
18
GrGpu
*
gpu
() {
return
fResourceProvider->gpu(); }
19
20
private
:
21
explicit
GrResourceProviderPriv
(
GrResourceProvider
* provider) : fResourceProvider(provider) {}
22
GrResourceProviderPriv
& operator=(
const
GrResourceProviderPriv
&) =
delete
;
23
24
// No taking addresses of this type.
25
const
GrResourceProviderPriv
* operator&()
const
;
26
GrResourceProviderPriv
* operator&();
27
28
GrResourceProvider
* fResourceProvider;
29
friend
class
GrResourceProvider
;
// to construct/copy this type
30
};
31
32
inline
GrResourceProviderPriv
GrResourceProvider::priv
() {
return
GrResourceProviderPriv
(
this
); }
33
34
inline
const
GrResourceProviderPriv
GrResourceProvider::priv
()
const
{
// NOLINT(readability-const-return-type)
35
return
GrResourceProviderPriv
(
const_cast<
GrResourceProvider
*
>
(
this
));
36
}
37
38
#endif
GrResourceProvider.h
GrGpu
Definition:
GrGpu.h:62
GrResourceProviderPriv
Definition:
GrResourceProviderPriv.h:16
GrResourceProviderPriv::gpu
GrGpu * gpu()
Definition:
GrResourceProviderPriv.h:18
GrResourceProvider
Definition:
GrResourceProvider.h:59
GrResourceProvider::GrResourceProviderPriv
friend class GrResourceProviderPriv
Definition:
GrResourceProvider.h:421
GrResourceProvider::priv
GrResourceProviderPriv priv()
Definition:
GrResourceProviderPriv.h:32
Generated on Sun Jun 23 2024 21:56:21 for Flutter Engine by
1.9.4