blob: 6e53a1ff5cedb4b42f1ad9bef2abceaec12356aa [file] [log] [blame]
Robert Phillips774168e2018-05-31 12:43:27 -04001/*
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 GrCCPerOpListPaths_DEFINED
9#define GrCCPerOpListPaths_DEFINED
10
11#include "SkArenaAlloc.h"
12#include "SkRefCnt.h"
13#include "SkTInternalLList.h"
14#include "GrCCClipPath.h"
15#include <map>
16
17class GrCCDrawPathsOp;
18class GrCCPerFlushResources;
19
20/**
21 * Tracks all the CCPR paths in a given opList that will be drawn when it flushes.
22 */
23// DDL TODO: given the usage pattern in DDL mode, this could probably be non-atomic refcounting.
24class GrCCPerOpListPaths : public SkRefCnt {
25public:
26 ~GrCCPerOpListPaths();
27
Robert Phillipsc994a932018-06-19 13:09:54 -040028 SkTInternalLList<GrCCDrawPathsOp> fDrawOps; // This class does not own these ops.
Robert Phillips774168e2018-05-31 12:43:27 -040029 std::map<uint32_t, GrCCClipPath> fClipPaths;
30 SkSTArenaAlloc<10 * 1024> fAllocator{10 * 1024 * 2};
31 sk_sp<const GrCCPerFlushResources> fFlushResources;
32};
33
34#endif