diff options
author | robertphillips <robertphillips@google.com> | 2015-06-23 06:26:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-23 06:26:08 -0700 |
commit | 702edbd4bc41230902b5fe69d14d15763c27fafe (patch) | |
tree | 7c8f0cef358e47fdb1f6fcf08f9ecf830fcf4bad /include/c | |
parent | 0a9af33a929f937e3630cd76c5b36d92344ee06a (diff) |
Propagate SkSurfaceProps to more call sites
Start moving to a world where everyone provides surface properties.
Most notably this exposes a portion of SkSurfaceProps to the C API.
BUG=skia:3934
Review URL: https://codereview.chromium.org/1195003003
Diffstat (limited to 'include/c')
-rw-r--r-- | include/c/sk_surface.h | 5 | ||||
-rw-r--r-- | include/c/sk_types.h | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/include/c/sk_surface.h b/include/c/sk_surface.h index ce7a568959..76fc5b6a66 100644 --- a/include/c/sk_surface.h +++ b/include/c/sk_surface.h @@ -15,8 +15,9 @@ SK_C_PLUS_PLUS_BEGIN_GUARD -sk_surface_t* sk_surface_new_raster(const sk_imageinfo_t*); -sk_surface_t* sk_surface_new_raster_direct(const sk_imageinfo_t*, void* pixels, size_t rowBytes); +sk_surface_t* sk_surface_new_raster(const sk_imageinfo_t*, const sk_surfaceprops_t*); +sk_surface_t* sk_surface_new_raster_direct(const sk_imageinfo_t*, void* pixels, size_t rowBytes, + const sk_surfaceprops_t* props); void sk_surface_unref(sk_surface_t*); /** diff --git a/include/c/sk_types.h b/include/c/sk_types.h index 00632e0af3..17ba92972a 100644 --- a/include/c/sk_types.h +++ b/include/c/sk_types.h @@ -53,6 +53,14 @@ typedef enum { DIFFERENCE_SK_CLIPTYPE, } sk_cliptype_t; +typedef enum { + UNKNOWN_SK_PIXELGEOMETRY, + RGB_H_SK_PIXELGEOMETRY, + BGR_H_SK_PIXELGEOMETRY, + RGB_V_SK_PIXELGEOMETRY, + BGR_V_SK_PIXELGEOMETRY, +} sk_pixelgeometry_t; + sk_colortype_t sk_colortype_get_default_8888(); typedef struct { @@ -63,6 +71,10 @@ typedef struct { } sk_imageinfo_t; typedef struct { + sk_pixelgeometry_t pixelGeometry; +} sk_surfaceprops_t; + +typedef struct { float x; float y; } sk_point_t; |