Skip SkBitmapProvider instantiation in SkImageShader::onContextSize
No reason to delegate through a SkBitmapProvider AFAICT. This avoids
some ref churn.
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2419333002
Review-Url: https://codereview.chromium.org/2419333002
diff --git a/src/image/SkImageShader.cpp b/src/image/SkImageShader.cpp
index 8407f10..a1882ab 100644
--- a/src/image/SkImageShader.cpp
+++ b/src/image/SkImageShader.cpp
@@ -46,7 +46,7 @@
}
size_t SkImageShader::onContextSize(const ContextRec& rec) const {
- return SkBitmapProcLegacyShader::ContextSize(rec, SkBitmapProvider(fImage.get()).info());
+ return SkBitmapProcLegacyShader::ContextSize(rec, as_IB(fImage)->onImageInfo());
}
SkShader::Context* SkImageShader::onCreateContext(const ContextRec& rec, void* storage) const {