Debian Codegraph @

src/core/SkCPURecorderImpl.h

raw
1 /*
2 * Copyright 2025 Google LLC
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 skcpu_RecorderImpl_DEFINED
9 #define skcpu_RecorderImpl_DEFINED
10
11 #include "include/core/SkCPURecorder.h"
12 #include "src/core/SkCPUContextImpl.h"
13
14 namespace skcpu {
15
16 class RecorderImpl final : public skcpu::Recorder {
17 public:
18 RecorderImpl(const ContextImpl* ctx) : fCtx(ctx) {}
19
20 const ContextImpl* ctx() const { return fCtx; }
21
22 private:
23 const ContextImpl* const fCtx;
24 };
25
26 } // namespace skcpu
27
28 inline skcpu::RecorderImpl* asRRI(skcpu::Recorder* rr) {
29 return static_cast<skcpu::RecorderImpl*>(rr);
30 }
31
32 #endif