blob: 61c3c59a5e674522caf6ecf1eb4a3917579ea277 [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"
Hal Canaryc2d0fb12018-09-19 10:28:59 -040015
Robert Phillips774168e2018-05-31 12:43:27 -040016#include <map>
17
18class GrCCDrawPathsOp;
19class GrCCPerFlushResources;
20
21/**
22 * Tracks all the CCPR paths in a given opList that will be drawn when it flushes.
23 */
24// DDL TODO: given the usage pattern in DDL mode, this could probably be non-atomic refcounting.
Chris Daltonb68bcc42018-09-14 00:44:22 -060025struct GrCCPerOpListPaths : public SkRefCnt {
26 SkTInternalLList<GrCCDrawPathsOp> fDrawOps; // This class does not own these ops.
Robert Phillips774168e2018-05-31 12:43:27 -040027 std::map<uint32_t, GrCCClipPath> fClipPaths;
28 SkSTArenaAlloc<10 * 1024> fAllocator{10 * 1024 * 2};
29 sk_sp<const GrCCPerFlushResources> fFlushResources;
30};
31
32#endif