1 /* 2 * Copyright 2022 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 #include "experimental/graphite/src/RecorderPriv.h" 9 10 #include "experimental/graphite/src/Gpu.h" 11 #include "experimental/graphite/src/TaskGraph.h" 12 13 namespace skgpu { 14 15 #define ASSERT_SINGLE_OWNER SKGPU_ASSERT_SINGLE_OWNER(fRecorder->singleOwner()) 16 resourceProvider() const17ResourceProvider* RecorderPriv::resourceProvider() const { 18 return fRecorder->fResourceProvider.get(); 19 } 20 uniformCache() const21UniformCache* RecorderPriv::uniformCache() const { 22 return fRecorder->fUniformCache.get(); 23 } 24 caps() const25const Caps* RecorderPriv::caps() const { 26 return fRecorder->fGpu->caps(); 27 } 28 drawBufferManager() const29DrawBufferManager* RecorderPriv::drawBufferManager() const { 30 return fRecorder->fDrawBufferManager.get(); 31 } 32 add(sk_sp<Task> task)33void RecorderPriv::add(sk_sp<Task> task) { 34 ASSERT_SINGLE_OWNER 35 fRecorder->fGraph->add(std::move(task)); 36 } 37 38 } // namespace skgpu 39