Chromium Code Reviews| Index: src/image/SkReadPixelsRec.h |
| diff --git a/src/image/SkReadPixelsRec.h b/src/image/SkReadPixelsRec.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9d815d6e339e347823784fd0bb1310310ffa00f8 |
| --- /dev/null |
| +++ b/src/image/SkReadPixelsRec.h |
| @@ -0,0 +1,31 @@ |
| +/* |
| + * Copyright 2014 Google Inc. |
| + * |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#ifndef SkReadPixelsRec_DEFINED |
| +#define SkReadPixelsRec_DEFINED |
| + |
| +#include "SkImageInfo.h" |
| + |
|
robertphillips
2014/12/10 15:26:57
// A helper class to abstract away some of the com
reed1
2014/12/10 15:35:20
Done.
|
| +struct SkReadPixelsRec { |
| + SkReadPixelsRec(const SkImageInfo& info, void* pixels, size_t rowBytes, int x, int y) |
| + : fPixels(pixels) |
| + , fRowBytes(rowBytes) |
| + , fInfo(info) |
| + , fX(x) |
| + , fY(y) |
| + {} |
| + |
| + void* fPixels; |
| + size_t fRowBytes; |
| + SkImageInfo fInfo; |
| + int fX; |
| + int fY; |
| + |
| + bool trim(int srcWidth, int srcHeight); |
| +}; |
| + |
| +#endif |