Roll third_party/skia/ ebfa2b71b..3050ef5ea (18 commits)
https://skia.googlesource.com/skia.git/+log/ebfa2b71bdab..3050ef5ea020
Fix Skia-enabled builds by renaming SkTDArray::count() to size(), or
switch to calling empty() where that makes more sense.
Created with:
roll-dep third_party/skia
Change-Id: Ib6928cd863304266e560f65eb322cdef7a90a636
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/99957
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nigi <nigi@chromium.org>
diff --git a/DEPS b/DEPS
index 768f582..3dc64a3 100644
--- a/DEPS
+++ b/DEPS
@@ -138,7 +138,7 @@
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling skia
# and whatever else without interference from each other.
- 'skia_revision': 'ebfa2b71bdabc353d915c9290ec8bbb71c9417f9',
+ 'skia_revision': '3050ef5ea0209ca79ed1672a2ff5dd7e07fd1a58',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling test_fonts
# and whatever else without interference from each other.
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 5988860..f5359d8 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -841,7 +841,7 @@
if (m_debugDisable)
return false;
Dump(__func__);
- int drawIndex = std::min(m_drawIndex, m_commands.count());
+ int drawIndex = std::min(m_drawIndex, m_commands.size());
if (Accumulator::kText == m_type || drawIndex != m_commandIndex ||
(Accumulator::kPath == m_type &&
DrawChanged(pMatrix, pDrawState, fill_color, stroke_color,
@@ -977,7 +977,7 @@
Flush();
return false;
}
- int drawIndex = std::min(m_drawIndex, m_commands.count());
+ int drawIndex = std::min(m_drawIndex, m_commands.size());
if (Accumulator::kPath == m_type || drawIndex != m_commandIndex ||
(Accumulator::kText == m_type &&
(FontChanged(pFont, matrix, font_size, scaleX, color, options) ||
@@ -1081,7 +1081,7 @@
#if defined(_SKIA_SUPPORT_PATHS_)
m_pDriver->PreMultiply();
#endif
- if (m_rsxform.count()) {
+ if (m_rsxform.size()) {
sk_sp<SkTextBlob> blob = SkTextBlob::MakeFromRSXform(
glyphs.begin(), glyphs.size_bytes(), m_rsxform.begin(), font,
SkTextEncoding::kGlyphID);
@@ -1104,7 +1104,7 @@
m_textOptions = CFX_TextRenderOptions();
}
- bool IsEmpty() const { return !m_commands.count(); }
+ bool IsEmpty() const { return m_commands.empty(); }
bool SetClipFill(const CFX_Path& path,
const CFX_Matrix* pMatrix,
@@ -1138,7 +1138,7 @@
bool SetClip(const SkPath& skClipPath) {
// if a pending draw depends on clip state that is cached, flush it and draw
- if (m_commandIndex < m_commands.count()) {
+ if (m_commandIndex < m_commands.size()) {
if (m_commands[m_commandIndex] == Clip::kPath &&
m_clips[m_commandIndex] == skClipPath) {
++m_commandIndex;
@@ -1153,7 +1153,7 @@
} while (m_commands[m_clipIndex] != Clip::kSave);
m_pDriver->SkiaCanvas()->restore();
}
- if (m_commandIndex < m_commands.count()) {
+ if (m_commandIndex < m_commands.size()) {
m_commands[m_commandIndex] = Clip::kPath;
m_clips[m_commandIndex] = skClipPath;
} else {
@@ -1207,7 +1207,7 @@
if (m_debugDisable)
return false;
Dump(__func__);
- int count = m_commands.count();
+ int count = m_commands.size();
if (m_commandIndex < count) {
if (Clip::kSave == m_commands[m_commandIndex]) {
++m_commandIndex;
@@ -1324,7 +1324,7 @@
return;
Dump(__func__);
if (Accumulator::kPath == m_type || Accumulator::kText == m_type) {
- AdjustClip(std::min(m_drawIndex, m_commands.count()));
+ AdjustClip(std::min(m_drawIndex, m_commands.size()));
Accumulator::kPath == m_type ? FlushPath() : FlushText();
}
}
@@ -1348,7 +1348,7 @@
}
void DumpEndPrefix() const {
- int index = m_commands.count();
+ int index = m_commands.size();
if (index != m_commandIndex && index > m_drawIndex && index != m_clipIndex)
return;
printf("%c%c%c>\n", index == m_commandIndex ? 'x' : '-',
@@ -1370,7 +1370,7 @@
#if SHOW_SKIA_PATH_SHORTHAND
bool dumpedPath = false;
#endif
- for (int index = 0; index < m_commands.count(); ++index) {
+ for (int index = 0; index < m_commands.size(); ++index) {
#if SHOW_SKIA_PATH_SHORTHAND
if (Clip::kSave == m_commands[index] && dumpedPath) {
printf("\n");
@@ -1401,7 +1401,7 @@
DumpEndPrefix();
int skCanvasSaveCount = m_pDriver->SkiaCanvas()->getSaveCount();
int cacheSaveCount = 1;
- DCHECK(m_clipIndex <= m_commands.count());
+ DCHECK(m_clipIndex <= m_commands.size());
for (int index = 0; index < m_clipIndex; ++index)
cacheSaveCount += Clip::kSave == m_commands[index];
DCHECK_EQ(skCanvasSaveCount, cacheSaveCount);
@@ -1461,7 +1461,7 @@
return;
int aggSaveCount = AggSaveCount(m_pDriver);
int cacheSaveCount = CacheSaveCount(m_commands, m_commandIndex);
- DCHECK(m_clipIndex <= m_commands.count());
+ DCHECK(m_clipIndex <= m_commands.size());
if (aggSaveCount != cacheSaveCount) {
// may not signify a bug if counts don't match
printf("aggSaveCount %d != cacheSaveCount %d\n", aggSaveCount,
@@ -1565,8 +1565,8 @@
m_fontCharWidths[index] = width;
}
int Count() const {
- DCHECK_EQ(m_positions.count(), m_glyphs.count());
- return m_glyphs.count();
+ DCHECK_EQ(m_positions.size(), m_glyphs.size());
+ return m_glyphs.size();
}
void SetCount(int count) {
DCHECK(count >= 0);
@@ -2289,9 +2289,9 @@
float end_y = pCoords->GetFloatAt(3);
SkPoint pts[] = {{start_x, start_y}, {end_x, end_y}};
skMatrix.mapPoints(pts, SK_ARRAY_COUNT(pts));
- paint.setShader(
- SkGradientShader::MakeLinear(pts, skColors.begin(), skPos.begin(),
- skColors.count(), SkTileMode::kClamp));
+ paint.setShader(SkGradientShader::MakeLinear(pts, skColors.begin(),
+ skPos.begin(), skColors.size(),
+ SkTileMode::kClamp));
if (clipStart || clipEnd) {
// if the gradient is horizontal or vertical, modify the draw rectangle
if (pts[0].fX == pts[1].fX) { // vertical
@@ -2333,7 +2333,7 @@
paint.setShader(SkGradientShader::MakeTwoPointConical(
pts[0], start_r, pts[1], end_r, skColors.begin(), skPos.begin(),
- skColors.count(), SkTileMode::kClamp));
+ skColors.size(), SkTileMode::kClamp));
if (clipStart || clipEnd) {
if (clipStart && start_r)
skClip.addCircle(pts[0].fX, pts[0].fY, start_r);