Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
m89-15595ea39c
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Jan 23, 2021
1 parent 8f43391 commit ee55821
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 108 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
- "patches/*.patch"

env:
# version: m88
skia_branch: chrome/m88
skia_commit: 21ebdec5170d890bb7fc7ec88d3dc0ee9995e600
release: m88-21ebdec517
# version: m89
skia_branch: chrome/m89
skia_commit: 15595ea39c4442ded546ba36ef63a521240bc0f4
release: m89-15595ea39c
archive: true

jobs:
Expand Down
79 changes: 0 additions & 79 deletions patches/11210_svg_objectBoundingBox.patch
Original file line number Diff line number Diff line change
@@ -1,82 +1,3 @@
diff --git a/modules/svg/include/SkSVGCircle.h b/modules/svg/include/SkSVGCircle.h
index 8bc0da9311..f0fe478200 100644
--- a/modules/svg/include/SkSVGCircle.h
+++ b/modules/svg/include/SkSVGCircle.h
@@ -30,6 +30,8 @@ protected:

SkPath onAsPath(const SkSVGRenderContext&) const override;

+ SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
+
private:
SkSVGCircle();

diff --git a/modules/svg/include/SkSVGPath.h b/modules/svg/include/SkSVGPath.h
index 169837e3cc..d92447ca76 100644
--- a/modules/svg/include/SkSVGPath.h
+++ b/modules/svg/include/SkSVGPath.h
@@ -26,6 +26,8 @@ protected:

SkPath onAsPath(const SkSVGRenderContext&) const override;

+ SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
+
private:
SkSVGPath();

diff --git a/modules/svg/include/SkSVGPoly.h b/modules/svg/include/SkSVGPoly.h
index ad890aabee..d3a314134b 100644
--- a/modules/svg/include/SkSVGPoly.h
+++ b/modules/svg/include/SkSVGPoly.h
@@ -34,6 +34,8 @@ protected:

SkPath onAsPath(const SkSVGRenderContext&) const override;

+ SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
+
private:
SkSVGPoly(SkSVGTag);

diff --git a/modules/svg/src/SkSVGCircle.cpp b/modules/svg/src/SkSVGCircle.cpp
index 6b25f0980d..208fa3b504 100644
--- a/modules/svg/src/SkSVGCircle.cpp
+++ b/modules/svg/src/SkSVGCircle.cpp
@@ -74,3 +74,11 @@ SkPath SkSVGCircle::onAsPath(const SkSVGRenderContext& ctx) const {

return path;
}
+
+SkRect SkSVGCircle::onObjectBoundingBox(const SkSVGRenderContext& ctx) const {
+ auto& lctx = ctx.lengthContext();
+ const auto cx = lctx.resolve(fCx, SkSVGLengthContext::LengthType::kHorizontal);
+ const auto cy = lctx.resolve(fCy, SkSVGLengthContext::LengthType::kVertical);
+ const auto r = lctx.resolve(fR , SkSVGLengthContext::LengthType::kOther);
+ return { cx - r, cy - r, cx + r, cy + r };
+}
diff --git a/modules/svg/src/SkSVGPath.cpp b/modules/svg/src/SkSVGPath.cpp
index f83937901d..ee8a7796cd 100644
--- a/modules/svg/src/SkSVGPath.cpp
+++ b/modules/svg/src/SkSVGPath.cpp
@@ -39,3 +39,7 @@ SkPath SkSVGPath::onAsPath(const SkSVGRenderContext& ctx) const {
this->mapToParent(&path);
return path;
}
+
+SkRect SkSVGPath::onObjectBoundingBox(const SkSVGRenderContext& ctx) const {
+ return fPath.getBounds();
+}
diff --git a/modules/svg/src/SkSVGPoly.cpp b/modules/svg/src/SkSVGPoly.cpp
index 0aac9e6783..6079a86c3f 100644
--- a/modules/svg/src/SkSVGPoly.cpp
+++ b/modules/svg/src/SkSVGPoly.cpp
@@ -46,3 +46,7 @@ SkPath SkSVGPoly::onAsPath(const SkSVGRenderContext& ctx) const {
this->mapToParent(&path);
return path;
}
+
+SkRect SkSVGPoly::onObjectBoundingBox(const SkSVGRenderContext& ctx) const {
+ return fPath.getBounds();
+}
diff --git a/modules/svg/src/SkSVGUse.cpp b/modules/svg/src/SkSVGUse.cpp
index bf4457c27a..f8def4c8b5 100644
--- a/modules/svg/src/SkSVGUse.cpp
Expand Down
25 changes: 0 additions & 25 deletions patches/Typeface_getVariationDesignParameters.patch

This file was deleted.

0 comments on commit ee55821

Please sign in to comment.