| 1 |
/* |
| 2 |
* Copyright 2020 Google LLC |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
#ifndef SkRescaleAndReadPixels_DEFINED |
| 8 |
#define SkRescaleAndReadPixels_DEFINED |
| 9 |
|
| 10 |
#include "include/core/SkImage.h" |
| 11 |
|
| 12 |
class SkBitmap; |
| 13 |
struct SkIRect; |
| 14 |
struct SkImageInfo; |
| 15 |
|
| 16 |
/** Generic/synchronous implementation for SkImage:: and SkSurface::asyncRescaleAndReadPixels. */ |
| 17 |
void SkRescaleAndReadPixels(SkBitmap src, |
| 18 |
const SkImageInfo& resultInfo, |
| 19 |
const SkIRect& srcRect, |
| 20 |
SkImage::RescaleGamma, |
| 21 |
SkImage::RescaleMode, |
| 22 |
SkImage::ReadPixelsCallback, |
| 23 |
SkImage::ReadPixelsContext); |
| 24 |
|
| 25 |
#endif // SkRescaleAndReadPixels_DEFINED |