aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrCCPerOpListPaths.h
blob: 6e53a1ff5cedb4b42f1ad9bef2abceaec12356aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Copyright 2018 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef GrCCPerOpListPaths_DEFINED
#define GrCCPerOpListPaths_DEFINED

#include "SkArenaAlloc.h"
#include "SkRefCnt.h"
#include "SkTInternalLList.h"
#include "GrCCClipPath.h"
#include <map>

class GrCCDrawPathsOp;
class GrCCPerFlushResources;

/**
 * Tracks all the CCPR paths in a given opList that will be drawn when it flushes.
 */
// DDL TODO: given the usage pattern in DDL mode, this could probably be non-atomic refcounting.
class GrCCPerOpListPaths : public SkRefCnt {
public:
    ~GrCCPerOpListPaths();

    SkTInternalLList<GrCCDrawPathsOp> fDrawOps; // This class does not own these ops.
    std::map<uint32_t, GrCCClipPath> fClipPaths;
    SkSTArenaAlloc<10 * 1024> fAllocator{10 * 1024 * 2};
    sk_sp<const GrCCPerFlushResources> fFlushResources;
};

#endif