summaryrefslogtreecommitdiff
path: root/core/fxge/skia
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-17 23:46:18 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-17 23:46:18 +0000
commit51a41ea222eeb852be4f372165d2d9bc9094b2a4 (patch)
tree3fb5a449bc07b4fb5dde81af62836d6bfdf2a48f /core/fxge/skia
parent11e5882fbb03bec43956ae0ea4a2a5d9593ccb34 (diff)
downloadpdfium-51a41ea222eeb852be4f372165d2d9bc9094b2a4.tar.xz
Use span<> in GetBits32().
Get bounds checking "for free". Change-Id: Ic60d63836f6c223e2ee1262649d47da54bb30ecc Reviewed-on: https://pdfium-review.googlesource.com/30876 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/skia')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 598dc480c2..6dd19eaed9 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -406,7 +406,7 @@ bool AddSamples(const CPDF_SampledFunc* pFunc,
colorsMin[i] = pFunc->GetRange(i * 2);
colorsMax[i] = pFunc->GetRange(i * 2 + 1);
}
- const uint8_t* pSampleData = pFunc->GetSampleStream()->GetData();
+ pdfium::span<const uint8_t> pSampleData = pFunc->GetSampleStream()->GetSpan();
for (uint32_t i = 0; i < sampleCount; ++i) {
float floatColors[3];
for (uint32_t j = 0; j < 3; ++j) {