Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2014 Google Inc. | |
| 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 | |
| 8 #ifndef SkReadPixelsRec_DEFINED | |
| 9 #define SkReadPixelsRec_DEFINED | |
| 10 | |
| 11 #include "SkImageInfo.h" | |
| 12 | |
|
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.
| |
| 13 struct SkReadPixelsRec { | |
| 14 SkReadPixelsRec(const SkImageInfo& info, void* pixels, size_t rowBytes, int x, int y) | |
| 15 : fPixels(pixels) | |
| 16 , fRowBytes(rowBytes) | |
| 17 , fInfo(info) | |
| 18 , fX(x) | |
| 19 , fY(y) | |
| 20 {} | |
| 21 | |
| 22 void* fPixels; | |
| 23 size_t fRowBytes; | |
| 24 SkImageInfo fInfo; | |
| 25 int fX; | |
| 26 int fY; | |
| 27 | |
| 28 bool trim(int srcWidth, int srcHeight); | |
| 29 }; | |
| 30 | |
| 31 #endif | |
| OLD | NEW |