2014-10-06 18:00:51 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2014 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2014-10-06 13:08:16 +00:00
|
|
|
|
2014-10-24 18:16:19 +00:00
|
|
|
// EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
|
|
|
|
// DO NOT USE -- FOR INTERNAL TESTING ONLY
|
|
|
|
|
2014-11-17 14:15:42 +00:00
|
|
|
#ifndef sk_surface_DEFINED
|
|
|
|
#define sk_surface_DEFINED
|
2014-10-06 18:00:51 +00:00
|
|
|
|
2014-11-17 14:15:42 +00:00
|
|
|
#include "sk_types.h"
|
2014-10-06 18:00:51 +00:00
|
|
|
|
2014-11-17 14:15:42 +00:00
|
|
|
SK_C_PLUS_PLUS_BEGIN_GUARD
|
2014-10-06 13:08:16 +00:00
|
|
|
|
2014-10-06 18:00:51 +00:00
|
|
|
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);
|
2014-11-25 03:11:48 +00:00
|
|
|
void sk_surface_unref(sk_surface_t*);
|
2014-10-24 18:16:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the canvas associated with this surface. Note: the canvas is owned by the surface,
|
|
|
|
* so the returned object is only valid while the owning surface is valid.
|
|
|
|
*/
|
2014-10-06 13:08:16 +00:00
|
|
|
sk_canvas_t* sk_surface_get_canvas(sk_surface_t*);
|
2014-11-17 14:15:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call sk_image_unref() when the returned image is no longer used.
|
|
|
|
*/
|
2014-10-06 13:08:16 +00:00
|
|
|
sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*);
|
|
|
|
|
2014-10-06 18:00:51 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
class SkCanvas;
|
|
|
|
void sk_test_capi(SkCanvas*);
|
|
|
|
#endif
|
|
|
|
|
2014-11-17 14:15:42 +00:00
|
|
|
SK_C_PLUS_PLUS_END_GUARD
|
|
|
|
|
2014-10-06 18:00:51 +00:00
|
|
|
#endif
|