d6841487eb
Any context that records ops (i.e., direct and/or DDL) will need these two objects. Change-Id: Ifd3527c23a4015f7d469ad2222563508cccbd339 Reviewed-on: https://skia-review.googlesource.com/c/190307 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
/*
|
|
* Copyright 2019 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef GrRecordingContext_DEFINED
|
|
#define GrRecordingContext_DEFINED
|
|
|
|
#include "GrAuditTrail.h"
|
|
#include "GrImageContext.h"
|
|
|
|
class GrOpMemoryPool;
|
|
class GrRecordingContextPriv;
|
|
|
|
class SK_API GrRecordingContext : public GrImageContext {
|
|
public:
|
|
~GrRecordingContext() override;
|
|
|
|
// Provides access to functions that aren't part of the public API.
|
|
GrRecordingContextPriv priv();
|
|
const GrRecordingContextPriv priv() const;
|
|
|
|
protected:
|
|
friend class GrRecordingContextPriv; // for hidden functions
|
|
|
|
GrRecordingContext(GrBackendApi, const GrContextOptions&, uint32_t contextID);
|
|
|
|
sk_sp<GrOpMemoryPool> refOpMemoryPool();
|
|
GrOpMemoryPool* opMemoryPool();
|
|
|
|
GrAuditTrail* auditTrail() { return &fAuditTrail; }
|
|
|
|
GrRecordingContext* asRecordingContext() override { return this; }
|
|
|
|
private:
|
|
// All the GrOp-derived classes use this pool.
|
|
sk_sp<GrOpMemoryPool> fOpMemoryPool;
|
|
GrAuditTrail fAuditTrail;
|
|
|
|
typedef GrImageContext INHERITED;
|
|
};
|
|
|
|
#endif
|