Roll third_party/skia/ 81bfabeb1..f04e09cd9 (1039 commits)
https://chromium.googlesource.com/skia.git/+log/81bfabeb18e6..f04e09cd9b8c
Created with:
roll-dep third_party/skia
Also replace uses of the legacy API SkCanvas.drawImage() with
SkCanvas.drawImageRect(), since the legacy API has been removed from
Skia in [1].
[1] http://review.skia.org/369036
Change-Id: I1caf17a1156f347b2a4783d0b90454091a28a30b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/78415
Commit-Queue: Hui Yingst <nigi@chromium.org>
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
diff --git a/DEPS b/DEPS
index 7083118..14e4b17 100644
--- a/DEPS
+++ b/DEPS
@@ -93,7 +93,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': '81bfabeb18e661dcbd7f9920c14f02a53826c4e2',
+ 'skia_revision': 'f04e09cd9b8ce23cc8314b6e3769c67aa2d22a7a',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling tools_memory
# 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 cc975f2..972ecf3 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -38,6 +38,7 @@
#include "third_party/base/ptr_util.h"
#include "third_party/base/span.h"
#include "third_party/base/stl_util.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkClipOp.h"
#include "third_party/skia/include/core/SkColorPriv.h"
@@ -45,6 +46,8 @@
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkRSXform.h"
+#include "third_party/skia/include/core/SkRect.h"
+#include "third_party/skia/include/core/SkSamplingOptions.h"
#include "third_party/skia/include/core/SkShader.h"
#include "third_party/skia/include/core/SkStream.h"
#include "third_party/skia/include/core/SkTextBlob.h"
@@ -2385,7 +2388,9 @@
SkBitmap skDstBitmap;
skDstBitmap.installPixels(dstImageInfo, dstBuffer, dstRowBytes);
SkCanvas canvas(skDstBitmap);
- canvas.drawBitmap(skSrcBitmap, left, top, nullptr);
+ canvas.drawImageRect(skSrcBitmap.asImage(),
+ SkRect::MakeXYWH(left, top, dstWidth, dstHeight),
+ SkSamplingOptions(), /*paint=*/nullptr);
return true;
#endif // defined(_SKIA_SUPPORT_)
@@ -2548,7 +2553,9 @@
}
}
} else {
- m_pCanvas->drawBitmap(skBitmap, 0, 0, &paint);
+ m_pCanvas->drawImageRect(skBitmap.asImage(),
+ SkRect::MakeWH(width, height),
+ SkSamplingOptions(), &paint);
}
}
DebugValidate(m_pBitmap, m_pBackdropBitmap);