| 1 |
/* |
| 2 |
* Copyright 2024 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 "tools/text/gpu/TextBlobTools.h" |
| 9 |
|
| 10 |
#include "src/text/gpu/SubRunContainer.h" |
| 11 |
#include "src/text/gpu/TextBlob.h" |
| 12 |
|
| 13 |
namespace sktext::gpu { |
| 14 |
|
| •15 |
const AtlasSubRun* TextBlobTools::FirstSubRun(const SubRunContainer* container) { |
| 16 |
SkASSERT(container); |
| 17 |
if (container->fSubRuns.isEmpty()) { |
| 18 |
return nullptr; |
| 19 |
} |
| •20 |
return container->fSubRuns.front().testingOnly_atlasSubRun(); |
| 21 |
} |
| 22 |
|
| 23 |
const AtlasSubRun* TextBlobTools::FirstSubRun(const TextBlob* blob) { |
| 24 |
SkASSERT(blob); |
| 25 |
return FirstSubRun(blob->fSubRuns.get()); |
| 26 |
} |
| 27 |
|
| 28 |
} // namespace sktext::gpu |