• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2011 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 SkPixelInfo_DEFINED
9 #define SkPixelInfo_DEFINED
10 
11 #include "SkImageInfo.h"
12 
13 struct SkPixelInfo {
14     SkColorType fColorType;
15     SkAlphaType fAlphaType;
16     size_t      fRowBytes;
17 };
18 
19 struct SkDstPixelInfo : SkPixelInfo {
20     void* fPixels;
21 };
22 
23 struct SkSrcPixelInfo : SkPixelInfo {
24     const void* fPixels;
25 
26     // Guaranteed to work even if src.fPixels and dst.fPixels are the same
27     // (but not if they overlap partially)
28     bool convertPixelsTo(SkDstPixelInfo* dst, int width, int height) const;
29 };
30 
31 #endif
32