Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrDeferredDisplayListPriv.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
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 GrDeferredDisplayListPriv_DEFINED
9#define GrDeferredDisplayListPriv_DEFINED
10
12
13/*************************************************************************************************/
14/** Class that adds methods to GrDeferredDisplayList that are only intended for use internal to
15 Skia. This class is purely a privileged window into GrDeferredDisplayList. It should never have
16 additional data members or virtual methods. */
18public:
19 int numRenderTasks() const {
20 return fDDL->fRenderTasks.size();
21 }
22
24 return fDDL->fTargetProxy.get();
25 }
26
27 const GrDeferredDisplayList::LazyProxyData* lazyProxyData() const {
28 return fDDL->fLazyProxyData.get();
29 }
30
32 return fDDL->programData();
33 }
34
36 return fDDL->fRenderTasks;
37 }
38
39private:
40 explicit GrDeferredDisplayListPriv(GrDeferredDisplayList* ddl) : fDDL(ddl) {}
41 GrDeferredDisplayListPriv& operator=(const GrDeferredDisplayListPriv&) = delete;
42
43 // No taking addresses of this type.
44 const GrDeferredDisplayListPriv* operator&() const;
45 GrDeferredDisplayListPriv* operator&();
46
48
49 friend class GrDeferredDisplayList; // to construct/copy this type.
50};
51
55
56inline const GrDeferredDisplayListPriv GrDeferredDisplayList::priv () const { // NOLINT(readability-const-return-type)
57 return GrDeferredDisplayListPriv(const_cast<GrDeferredDisplayList*>(this));
58}
59
60#endif
GrRenderTargetProxy * targetProxy() const
const skia_private::TArray< GrRecordingContext::ProgramData > & programData() const
const GrDeferredDisplayList::LazyProxyData * lazyProxyData() const
const skia_private::TArray< sk_sp< GrRenderTask > > & renderTasks() const
GrDeferredDisplayListPriv priv()
T * get() const
Definition SkRefCnt.h:303
int size() const
Definition SkTArray.h:416