aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TypefaceTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-09-25 13:49:49 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-25 19:26:39 +0000
commitd6c04d9a05c1b4066c09083a673d7d3cf61a3aa6 (patch)
treec4910af823acd31f79f3e6008f3aad365c6993dc /tests/TypefaceTest.cpp
parentffbdd022dc6ec372500671b508a3d7ab025727d9 (diff)
Simplify / fix SkBitmap::ReadRawPixels()
We no longer need to look at the field snugRB except to check for the simple no-pixels case. This is good, because our snugRB <= ramRB check is actually too weak, and is the source of this linked Chromium issue. BUG=chromium:765858 Instead of doing complicated checks against that stored snugRB and the computed ramRB, we now just ignore snugRB. We know the images written by write_row_bytes() will be snug, so we can just look at width, height, and color type to figure out exactly how many bytes we should be reading. Then it becomes the call to readByteArray()'s responsibility to make sure that we have an array there of exactly that many bytes to read. We've just got to make sure we check for its failure. Change-Id: Ia05c36d8a77b0de16ee03a80f6cb2dab6fcedbae Reviewed-on: https://skia-review.googlesource.com/50800 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/TypefaceTest.cpp')
0 files changed, 0 insertions, 0 deletions