GrCCPerOpListPaths.h 928 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  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. #ifndef GrCCPerOpListPaths_DEFINED
  8. #define GrCCPerOpListPaths_DEFINED
  9. #include "include/core/SkRefCnt.h"
  10. #include "src/core/SkArenaAlloc.h"
  11. #include "src/core/SkTInternalLList.h"
  12. #include "src/gpu/ccpr/GrCCClipPath.h"
  13. #include <map>
  14. class GrCCDrawPathsOp;
  15. class GrCCPerFlushResources;
  16. /**
  17. * Tracks all the CCPR paths in a given opList that will be drawn when it flushes.
  18. */
  19. // DDL TODO: given the usage pattern in DDL mode, this could probably be non-atomic refcounting.
  20. struct GrCCPerOpListPaths : public SkRefCnt {
  21. SkTInternalLList<GrCCDrawPathsOp> fDrawOps; // This class does not own these ops.
  22. std::map<uint32_t, GrCCClipPath> fClipPaths;
  23. SkSTArenaAlloc<10 * 1024> fAllocator{10 * 1024 * 2};
  24. sk_sp<const GrCCPerFlushResources> fFlushResources;
  25. };
  26. #endif