blob: ff8a224e66e23835ef58e99217d3d17518eb6b25 [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
Greg Danielf41b2bd2019-08-22 16:19:24 -04008#ifndef GrCCPerOpsTaskPaths_DEFINED
9#define GrCCPerOpsTaskPaths_DEFINED
Robert Phillips774168e2018-05-31 12:43:27 -040010
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/core/SkRefCnt.h"
Ben Wagner729a23f2019-05-17 16:29:34 -040012#include "src/core/SkArenaAlloc.h"
13#include "src/core/SkTInternalLList.h"
14#include "src/gpu/ccpr/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/**
Greg Danielf41b2bd2019-08-22 16:19:24 -040022 * Tracks all the CCPR paths in a given opsTask that will be drawn when it flushes.
Robert Phillips774168e2018-05-31 12:43:27 -040023 */
24// DDL TODO: given the usage pattern in DDL mode, this could probably be non-atomic refcounting.
Greg Danielf41b2bd2019-08-22 16:19:24 -040025struct GrCCPerOpsTaskPaths : public SkRefCnt {
Chris Daltonb68bcc42018-09-14 00:44:22 -060026 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