| * Copyright 2018 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| #ifndef sk_pixel_iter_DEFINED |
| #define sk_pixel_iter_DEFINED |
| namespace sk_tool_utils { |
| PixelIter(SkSurface* surf) { |
| if (!surf->peekPixels(&pm)) { |
| void reset(const SkPixmap& pm) { |
| void* next(SkIPoint* loc = nullptr) { |
| if (fLoc.fX >= fPM.width()) { |
| if (++fLoc.fY >= fPM.height()) { |
| return fPM.writable_addr(fLoc.fX, fLoc.fY); |
| } // namespace sk_tool_utils |
| #endif // sk_tool_utils_DEFINED |