• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 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/include/SkStuff.h"
9 
10 #include "experimental/graphite/src/Device.h"
11 #include "experimental/graphite/src/Recorder.h"
12 #include "experimental/graphite/src/Surface_Graphite.h"
13 
MakeGraphite(sk_sp<skgpu::Recorder> recorder,const SkImageInfo & ii)14 sk_sp<SkSurface> MakeGraphite(sk_sp<skgpu::Recorder> recorder, const SkImageInfo& ii) {
15     sk_sp<skgpu::Device> device = skgpu::Device::Make(std::move(recorder), ii);
16     if (!device) {
17         return nullptr;
18     }
19 
20     return sk_make_sp<skgpu::Surface_Graphite>(std::move(device));
21 }
22