未验证 提交 d6b8eba4 编写于 作者: M Michael Reed 提交者: GitHub

drawBitmap is deprecated, use drawImage (#24135)

Co-authored-by: NMike Reed <reed@google.com>
上级 e4c4a2f2
......@@ -13,6 +13,7 @@
#include "flutter/fml/trace_event.h"
#include "flutter/shell/platform/android/android_shell_holder.h"
#include "flutter/shell/platform/android/jni/platform_view_android_jni.h"
#include "third_party/skia/include/core/SkImage.h"
namespace flutter {
......@@ -130,9 +131,10 @@ bool AndroidSurfaceSoftware::PresentBackingStore(
if (canvas) {
SkBitmap bitmap;
if (bitmap.installPixels(pixmap)) {
canvas->drawBitmapRect(
bitmap, SkRect::MakeIWH(native_buffer.width, native_buffer.height),
nullptr);
canvas->drawImageRect(
bitmap.asImage(),
SkRect::MakeIWH(native_buffer.width, native_buffer.height),
SkSamplingOptions());
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册