Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Side by Side Diff: tools/sk_tool_utils.h

Issue 199413013: add new readPixels with direct memory parameters (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef sk_tool_utils_DEFINED 8 #ifndef sk_tool_utils_DEFINED
9 #define sk_tool_utils_DEFINED 9 #define sk_tool_utils_DEFINED
10 10
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkBitmap.h" 12 #include "SkBitmap.h"
13 13
14 namespace sk_tool_utils { 14 namespace sk_tool_utils {
15
16 const char* colortype_name(SkColorType);
15 17
16 /** 18 /**
17 * Return the colorType and alphaType that correspond to the specified Conf ig8888 19 * Return the colorType and alphaType that correspond to the specified Conf ig8888
18 */ 20 */
19 void config8888_to_imagetypes(SkCanvas::Config8888, SkColorType*, SkAlphaTyp e*); 21 void config8888_to_imagetypes(SkCanvas::Config8888, SkColorType*, SkAlphaTyp e*);
20 22
21 /** 23 /**
22 * Call canvas->writePixels() by using the pixels from bitmap, but with an info that claims 24 * Call canvas->writePixels() by using the pixels from bitmap, but with an info that claims
23 * the pixels are colorType + alphaType 25 * the pixels are colorType + alphaType
24 */ 26 */
25 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkA lphaType); 27 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkA lphaType);
26 } 28 }
27 29
28 #endif 30 #endif
OLDNEW
« src/core/SkCanvas.cpp ('K') | « tests/ReadPixelsTest.cpp ('k') | tools/sk_tool_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698