diff options
author | reed <reed@google.com> | 2016-03-09 14:26:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-09 14:26:26 -0800 |
commit | 6ceeebd37a43d879c120b6ba100ae1febdd67a18 (patch) | |
tree | 6c4dfeb68ba4183bc2e63d8888ae01f24caede88 /gm | |
parent | f842c50116863f44240f806509f14e434eabb0a8 (diff) |
unify peekPixels around pixmap parameter
requires this chrome CL to land first
https://codereview.chromium.org/1775393003/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1784563002
Review URL: https://codereview.chromium.org/1784563002
Diffstat (limited to 'gm')
-rw-r--r-- | gm/blend.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gm/blend.cpp b/gm/blend.cpp index 94dc4c7f75..6ecea4c8e9 100644 --- a/gm/blend.cpp +++ b/gm/blend.cpp @@ -36,7 +36,8 @@ DEF_SIMPLE_GM(blend, canvas, 300, 100) { // Print out the colors in each block (if we're looking at 8888 raster). if (canvas->imageInfo().colorType() == kN32_SkColorType) { - if (const SkPMColor* px = (const SkPMColor*)canvas->peekPixels(nullptr, nullptr)) { + SkPixmap pmap; + if (const SkPMColor* px = canvas->peekPixels(&pmap) ? pmap.addr32() : nullptr) { p.setColor(SK_ColorWHITE); for (int i = 0; i < 3; i++) { SkPMColor c = px[i * 100]; |