Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ vars = {
"upstream_sqlite": "https://github.com/sqlite/sqlite.git",
"upstream_sse": "https://github.com/dart-lang/sse.git",
"upstream_stack_trace": "https://github.com/dart-lang/stack_trace.git",
"upstream_stb": "https://github.com/nothings/stb.git",
"upstream_stream_channel": "https://github.com/dart-lang/stream_channel.git",
"upstream_string_scanner": "https://github.com/dart-lang/string_scanner.git",
"upstream_SwiftShader": "https://swiftshader.googlesource.com/SwiftShader.git",
Expand Down Expand Up @@ -257,7 +258,7 @@ allowed_hosts = [
]

deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'a067408d923ccf80742571bb7a71705499f5779e',
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'f91786b0f7ed84f4d55fef7707b68bea180281f5',

# Fuchsia compatibility
#
Expand Down Expand Up @@ -681,6 +682,9 @@ deps = {
'src/third_party/json':
Var('github_git') + '/nlohmann/json.git' + '@' + '17d9eacd248f58b73f4d1be518ef649fe2295642',

'src/third_party/stb':
Var('github_git') + '/nothings/stb.git' + '@' + '5736b15f7ea0ffb08dd38af21067c314d6a3aae9',

'src/third_party/gradle': {
'packages': [
{
Expand Down
1 change: 1 addition & 0 deletions ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -2890,6 +2890,7 @@
../../../third_party/sqlite/Makefile
../../../third_party/sqlite/README.md
../../../third_party/sqlite/VERSION
../../../third_party/stb
../../../third_party/swiftshader
../../../third_party/tinygltf
../../../third_party/vulkan-deps/.git
Expand Down
36 changes: 28 additions & 8 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -1705,12 +1705,22 @@ ORIGIN: ../../../flutter/impeller/toolkit/egl/surface.cc + ../../../flutter/LICE
ORIGIN: ../../../flutter/impeller/toolkit/egl/surface.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/toolkit/gles/gles.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/toolkit/gles/texture.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/glyph_atlas_context_skia.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/glyph_atlas_context_skia.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/text_frame_skia.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/text_frame_skia.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/text_render_context_skia.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/text_render_context_skia.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/typeface_skia.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/typeface_skia.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/typographer_context_skia.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/skia/typographer_context_skia.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/stb/glyph_atlas_context_stb.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/stb/glyph_atlas_context_stb.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/stb/text_frame_stb.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/stb/text_frame_stb.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/stb/typeface_stb.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/stb/typeface_stb.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/stb/typographer_context_stb.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/backends/stb/typographer_context_stb.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/font.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/font.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/font_glyph_pair.cc + ../../../flutter/LICENSE
Expand All @@ -1725,12 +1735,12 @@ ORIGIN: ../../../flutter/impeller/typographer/rectangle_packer.cc + ../../../flu
ORIGIN: ../../../flutter/impeller/typographer/rectangle_packer.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/text_frame.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/text_frame.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/text_render_context.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/text_render_context.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/text_run.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/text_run.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/typeface.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/typeface.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/typographer_context.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/typographer/typographer_context.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/gpu/context.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/gpu/context.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/lib/gpu/export.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -4436,12 +4446,22 @@ FILE: ../../../flutter/impeller/toolkit/gles/gles.h
FILE: ../../../flutter/impeller/toolkit/gles/texture.cc
FILE: ../../../flutter/impeller/toolkit/gles/texture.h
FILE: ../../../flutter/impeller/tools/malioc.json
FILE: ../../../flutter/impeller/typographer/backends/skia/glyph_atlas_context_skia.cc
FILE: ../../../flutter/impeller/typographer/backends/skia/glyph_atlas_context_skia.h
FILE: ../../../flutter/impeller/typographer/backends/skia/text_frame_skia.cc
FILE: ../../../flutter/impeller/typographer/backends/skia/text_frame_skia.h
FILE: ../../../flutter/impeller/typographer/backends/skia/text_render_context_skia.cc
FILE: ../../../flutter/impeller/typographer/backends/skia/text_render_context_skia.h
FILE: ../../../flutter/impeller/typographer/backends/skia/typeface_skia.cc
FILE: ../../../flutter/impeller/typographer/backends/skia/typeface_skia.h
FILE: ../../../flutter/impeller/typographer/backends/skia/typographer_context_skia.cc
FILE: ../../../flutter/impeller/typographer/backends/skia/typographer_context_skia.h
FILE: ../../../flutter/impeller/typographer/backends/stb/glyph_atlas_context_stb.cc
FILE: ../../../flutter/impeller/typographer/backends/stb/glyph_atlas_context_stb.h
FILE: ../../../flutter/impeller/typographer/backends/stb/text_frame_stb.cc
FILE: ../../../flutter/impeller/typographer/backends/stb/text_frame_stb.h
FILE: ../../../flutter/impeller/typographer/backends/stb/typeface_stb.cc
FILE: ../../../flutter/impeller/typographer/backends/stb/typeface_stb.h
FILE: ../../../flutter/impeller/typographer/backends/stb/typographer_context_stb.cc
FILE: ../../../flutter/impeller/typographer/backends/stb/typographer_context_stb.h
FILE: ../../../flutter/impeller/typographer/font.cc
FILE: ../../../flutter/impeller/typographer/font.h
FILE: ../../../flutter/impeller/typographer/font_glyph_pair.cc
Expand All @@ -4456,12 +4476,12 @@ FILE: ../../../flutter/impeller/typographer/rectangle_packer.cc
FILE: ../../../flutter/impeller/typographer/rectangle_packer.h
FILE: ../../../flutter/impeller/typographer/text_frame.cc
FILE: ../../../flutter/impeller/typographer/text_frame.h
FILE: ../../../flutter/impeller/typographer/text_render_context.cc
FILE: ../../../flutter/impeller/typographer/text_render_context.h
FILE: ../../../flutter/impeller/typographer/text_run.cc
FILE: ../../../flutter/impeller/typographer/text_run.h
FILE: ../../../flutter/impeller/typographer/typeface.cc
FILE: ../../../flutter/impeller/typographer/typeface.h
FILE: ../../../flutter/impeller/typographer/typographer_context.cc
FILE: ../../../flutter/impeller/typographer/typographer_context.h
FILE: ../../../flutter/lib/gpu/context.cc
FILE: ../../../flutter/lib/gpu/context.h
FILE: ../../../flutter/lib/gpu/export.cc
Expand Down
2 changes: 1 addition & 1 deletion ci/licenses_golden/tool_signature
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Signature: d8b5e1bcc7593e590ac227d01043c4a8
Signature: 996bda987bb421e5aecf9238c247c296

2 changes: 1 addition & 1 deletion impeller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ group("impeller") {
"image:image_skia_backend",
"renderer",
"renderer/backend",
"typographer",
"typographer/backends/skia:typographer_skia_backend",
]
}
}
Expand Down
7 changes: 7 additions & 0 deletions impeller/aiks/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impeller_component("aiks") {

impeller_component("aiks_playground") {
testonly = true

sources = [
"aiks_playground.cc",
"aiks_playground.h",
Expand All @@ -45,10 +46,14 @@ impeller_component("aiks_playground") {
":aiks",
"../playground:playground_test",
]
public_deps = [
"//flutter/impeller/typographer/backends/skia:typographer_skia_backend",
]
}

impeller_component("aiks_unittests") {
testonly = true

sources = [
"aiks_unittests.cc",
"canvas_unittests.cc",
Expand All @@ -62,6 +67,7 @@ impeller_component("aiks_unittests") {
"//flutter/impeller/geometry:geometry_asserts",
"//flutter/impeller/golden_tests:golden_playground_test",
"//flutter/impeller/playground:playground_test",
"//flutter/impeller/typographer/backends/stb:typographer_stb_backend",
"//flutter/testing:testing_lib",
]
}
Expand All @@ -86,6 +92,7 @@ impeller_component("aiks_unittests_golden") {
"//flutter/impeller/geometry:geometry_asserts",
"//flutter/impeller/golden_tests:golden_playground_test",
"//flutter/impeller/playground:playground_test",
"//flutter/impeller/typographer/backends/stb:typographer_stb_backend",
"//flutter/testing:testing_lib",
]
}
9 changes: 5 additions & 4 deletions impeller/aiks/aiks_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
#include "impeller/aiks/aiks_context.h"

#include "impeller/aiks/picture.h"
#include "impeller/typographer/text_render_context.h"
#include "impeller/typographer/typographer_context.h"

namespace impeller {

AiksContext::AiksContext(std::shared_ptr<Context> context,
std::shared_ptr<TextRenderContext> text_render_context)
AiksContext::AiksContext(
std::shared_ptr<Context> context,
std::shared_ptr<TypographerContext> typographer_context)
: context_(std::move(context)) {
if (!context_ || !context_->IsValid()) {
return;
}

content_context_ = std::make_unique<ContentContext>(
context_, std::move(text_render_context));
context_, std::move(typographer_context));
if (!content_context_->IsValid()) {
return;
}
Expand Down
6 changes: 3 additions & 3 deletions impeller/aiks/aiks_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "impeller/entity/contents/content_context.h"
#include "impeller/renderer/context.h"
#include "impeller/renderer/render_target.h"
#include "impeller/typographer/text_render_context.h"
#include "impeller/typographer/typographer_context.h"

namespace impeller {

Expand All @@ -24,12 +24,12 @@ class AiksContext {
/// @param context The Impeller context that Aiks should use for
/// allocating resources and executing device
/// commands. Required.
/// @param text_render_context The text backend to use for rendering text. If
/// @param typographer_context The text backend to use for rendering text. If
/// `nullptr` is supplied, then attempting to draw
/// text with Aiks will result in validation
/// errors.
AiksContext(std::shared_ptr<Context> context,
std::shared_ptr<TextRenderContext> text_render_context);
std::shared_ptr<TypographerContext> typographer_context);

~AiksContext();

Expand Down
14 changes: 7 additions & 7 deletions impeller/aiks/aiks_playground.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
#include <memory>

#include "impeller/aiks/aiks_context.h"
#include "impeller/typographer/backends/skia/text_render_context_skia.h"
#include "impeller/typographer/text_render_context.h"
#include "impeller/typographer/backends/skia/typographer_context_skia.h"
#include "impeller/typographer/typographer_context.h"
#include "third_party/imgui/imgui.h"

namespace impeller {

AiksPlayground::AiksPlayground()
: text_render_context_(TextRenderContextSkia::Make()) {}
: typographer_context_(TypographerContextSkia::Make()) {}

AiksPlayground::~AiksPlayground() = default;

void AiksPlayground::SetTextRenderContext(
std::shared_ptr<TextRenderContext> text_render_context) {
text_render_context_ = std::move(text_render_context);
void AiksPlayground::SetTypographerContext(
std::shared_ptr<TypographerContext> typographer_context) {
typographer_context_ = std::move(typographer_context);
}

bool AiksPlayground::OpenPlaygroundHere(const Picture& picture) {
Expand All @@ -35,7 +35,7 @@ bool AiksPlayground::OpenPlaygroundHere(AiksPlaygroundCallback callback) {
return true;
}

AiksContext renderer(GetContext(), text_render_context_);
AiksContext renderer(GetContext(), typographer_context_);

if (!renderer.IsValid()) {
return false;
Expand Down
8 changes: 4 additions & 4 deletions impeller/aiks/aiks_playground.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "impeller/aiks/aiks_context.h"
#include "impeller/aiks/picture.h"
#include "impeller/playground/playground_test.h"
#include "impeller/typographer/text_render_context.h"
#include "impeller/typographer/typographer_context.h"

namespace impeller {

Expand All @@ -21,15 +21,15 @@ class AiksPlayground : public PlaygroundTest {

~AiksPlayground();

void SetTextRenderContext(
std::shared_ptr<TextRenderContext> text_render_context);
void SetTypographerContext(
std::shared_ptr<TypographerContext> typographer_context);

bool OpenPlaygroundHere(const Picture& picture);

bool OpenPlaygroundHere(AiksPlaygroundCallback callback);

private:
std::shared_ptr<TextRenderContext> text_render_context_;
std::shared_ptr<TypographerContext> typographer_context_;

FML_DISALLOW_COPY_AND_ASSIGN(AiksPlayground);
};
Expand Down
Loading