blob: a450aa1244f9ec21a5018b0b2c5da1880d2053c2 [file] [log] [blame]
commit-bot@chromium.org4cd9e212014-03-07 03:25:16 +00001/*
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 sk_tool_utils_DEFINED
9#define sk_tool_utils_DEFINED
10
11#include "SkCanvas.h"
12#include "SkBitmap.h"
13
14namespace sk_tool_utils {
commit-bot@chromium.orga713f9c2014-03-17 21:31:26 +000015
16 const char* colortype_name(SkColorType);
commit-bot@chromium.org4cd9e212014-03-07 03:25:16 +000017
18 /**
19 * Return the colorType and alphaType that correspond to the specified Config8888
20 */
21 void config8888_to_imagetypes(SkCanvas::Config8888, SkColorType*, SkAlphaType*);
22
23 /**
24 * Call canvas->writePixels() by using the pixels from bitmap, but with an info that claims
25 * the pixels are colorType + alphaType
26 */
27 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkAlphaType);
28}
29
30#endif