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

Side by Side Diff: tests/CanvasStateHelpers.h

Issue 400043003: Run CanvasState test across a library boundary. (Closed) Base URL: https://skia.googlesource.com/skia.git@canvasState2
Patch Set: New class to open the library and close it. Created 6 years, 5 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
OLDNEW
(Empty)
1 /*
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 CanvasStateHelpers_DEFINED
9 #define CanvasStateHelpers_DEFINED
10
11 #include "SkTypes.h"
12
13 #ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
14 class SkCanvas;
15 class SkCanvasState;
16 class SkRegion;
17
18 /*
19 * Helper function to perform drawing to an SkCanvas. Used by both
20 * test_complex_layers and complex_layers_draw_from_canvas_state.
21 */
22 void complex_layers_draw(SkCanvas* canvas, float left, float top,
23 float right, float bottom, int32_t spacer);
24
25 /*
26 * Create an SkCanvas from state and draw to it. Return true on success.
27 *
28 * Used by test_complex_layers test in CanvasStateTest. Marked as extern
29 * so it can be called from a separate library.
30 */
31 extern "C" bool complex_layers_draw_from_canvas_state(SkCanvasState* state,
32 float left, float top, float right, float bottom, int32_t spacer);
33
34 /*
35 * Helper function to perform drawing to an SkCanvas. Used both by test_complex _clips
36 * and complex_clips_draw_from_canvas_state.
37 */
38 void complex_clips_draw(SkCanvas* canvas, int32_t left, int32_t top,
39 int32_t right, int32_t bottom, int32_t clipOp, const SkRegion& localRegi on);
40
41 /*
42 * Create an SkCanvas from state and draw to it. Return true on success.
43 *
44 * Used by test_complex_clips test in CanvasStateTest. Marked as extern
45 * so it can be called from a separate library.
46 */
47 extern "C" bool complex_clips_draw_from_canvas_state(SkCanvasState* state,
48 int32_t left, int32_t top, int32_t right, int32_t bottom, int32_t clipOp ,
49 int32_t regionRects, int32_t* rectCoords);
50
51 #endif // SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
52 #endif // CanvasStateHelpers_DEFINED
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | tests/CanvasStateHelpers.cpp » ('j') | tests/CanvasStateTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698