summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/layers/DumpLayer.h
blob: 5b309524e3d4a89c900398510c4a09cf7fa7c7d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
 * Copyright (C) 2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef DumpLayer_h
#define DumpLayer_h

#include "IntPoint.h"
#include "SkPoint.h"
#include "SkRect.h"
#include "SkSize.h"
#include "TransformationMatrix.h"

// Debug tools : dump the layers tree in a file.
// The format is simple:
// properties have the form: key = value;
// all statements are finished with a semi-colon.
// value can be:
// - int
// - float
// - array of elements
// - composed type
// a composed type enclose properties in { and }
// an array enclose composed types in { }, separated with a comma.
// exemple:
// {
//   x = 3;
//   y = 4;
//   value = {
//     x = 3;
//     y = 4;
//   };
//   anarray = [
//     { x = 3; },
//     { y = 4; }
//   ];
// }

namespace WebCore {

void lwrite(FILE* file, const char* str);
void writeIndent(FILE* file, int indentLevel);
void writeln(FILE* file, int indentLevel, const char* str);
void writeIntVal(FILE* file, int indentLevel, const char* str, int value);
void writeHexVal(FILE* file, int indentLevel, const char* str, int value);
void writeFloatVal(FILE* file, int indentLevel, const char* str, float value);
void writePoint(FILE* file, int indentLevel, const char* str, SkPoint point);
void writeIntPoint(FILE* file, int indentLevel, const char* str, IntPoint point);
void writeSize(FILE* file, int indentLevel, const char* str, SkSize size);
void writeRect(FILE* file, int indentLevel, const char* str, SkRect rect);
void writeMatrix(FILE* file, int indentLevel, const char* str, const TransformationMatrix& matrix);

}

#endif // DumpLayer_h