skia2/include/private/GrCCPerOpListPaths.h
Chris Dalton b68bcc4398 ccpr: Remove the dangling pointer from GrCCDrawPathsOp
Actually takes a ref on fOwningPerOpListPaths, instead of just
asserting it continues to exist. Removes unnecessary asserts
surrounding dangling pointers.

Bug: skia:8359
Change-Id: Ie80da55510f320452bd9ee3a4b38bd59d48681a0
Reviewed-on: https://skia-review.googlesource.com/154684
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-09-14 16:32:58 +00:00

32 lines
883 B
C++

/*
* 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.
struct GrCCPerOpListPaths : public SkRefCnt {
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