blob: 0fdfaa7108aac1ce562be8673a14ebe8a5ad720c [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001/*
2 * Copyright 2011 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 */
reed@google.com76f10a32014-02-05 15:32:21 +00007
reed@android.com8a1c16f2008-12-17 15:59:43 +00008#ifndef SkPictureRecord_DEFINED
9#define SkPictureRecord_DEFINED
10
11#include "SkCanvas.h"
12#include "SkFlattenable.h"
robertphillips@google.com105a4a52014-02-11 15:10:40 +000013#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
14#include "SkMatrixClipStateMgr.h"
15#endif
reed@android.com8a1c16f2008-12-17 15:59:43 +000016#include "SkPathHeap.h"
17#include "SkPicture.h"
robertphillipsdb539902014-07-01 08:47:04 -070018#include "SkPictureData.h"
reed@android.com8a1c16f2008-12-17 15:59:43 +000019#include "SkPictureFlat.h"
20#include "SkTemplates.h"
21#include "SkWriter32.h"
22
rileya@google.com9f5898d2012-09-11 20:21:44 +000023class SkBBoxHierarchy;
commit-bot@chromium.org8016f792014-03-07 15:53:01 +000024class SkPictureStateTree;
rileya@google.com9f5898d2012-09-11 20:21:44 +000025
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +000026// These macros help with packing and unpacking a single byte value and
27// a 3 byte value into/out of a uint32_t
28#define MASK_24 0x00FFFFFF
29#define UNPACK_8_24(combined, small, large) \
30 small = (combined >> 24) & 0xFF; \
31 large = combined & MASK_24;
32#define PACK_8_24(small, large) ((small << 24) | large)
33
34
reed@android.com8a1c16f2008-12-17 15:59:43 +000035class SkPictureRecord : public SkCanvas {
36public:
robertphillips0bdbea72014-06-11 11:37:55 -070037 SkPictureRecord(const SkISize& dimensions, uint32_t recordFlags);
reed@android.com8a1c16f2008-12-17 15:59:43 +000038 virtual ~SkPictureRecord();
39
reed@google.com2d4297c2011-10-06 13:14:12 +000040 virtual void clear(SkColor) SK_OVERRIDE;
41 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
reed@android.com8a1c16f2008-12-17 15:59:43 +000042 virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
reed@google.com2d4297c2011-10-06 13:14:12 +000043 const SkPaint&) SK_OVERRIDE;
reed@google.com4ed0fb72012-12-12 20:48:18 +000044 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
bsalomon@google.com7ce564c2013-10-22 16:54:15 +000045 virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
reed@google.com4ed0fb72012-12-12 20:48:18 +000046 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
bsalomon@google.com7ce564c2013-10-22 16:54:15 +000047 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
reed@android.com8a1c16f2008-12-17 15:59:43 +000048 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
reed@google.com2d4297c2011-10-06 13:14:12 +000049 const SkPaint*) SK_OVERRIDE;
reed@google.com71121732012-09-18 15:14:33 +000050 virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
skia.committer@gmail.com74758112013-08-17 07:01:54 +000051 const SkRect& dst, const SkPaint* paint,
commit-bot@chromium.orgeed779d2013-08-16 10:24:37 +000052 DrawBitmapRectFlags flags) SK_OVERRIDE;
reed@android.com8a1c16f2008-12-17 15:59:43 +000053 virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&,
reed@google.com2d4297c2011-10-06 13:14:12 +000054 const SkPaint*) SK_OVERRIDE;
reed@google.comf0b5e112011-09-07 11:57:34 +000055 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
reed@google.com2d4297c2011-10-06 13:14:12 +000056 const SkRect& dst, const SkPaint*) SK_OVERRIDE;
reed@android.com8a1c16f2008-12-17 15:59:43 +000057 virtual void drawSprite(const SkBitmap&, int left, int top,
reed@google.com2d4297c2011-10-06 13:14:12 +000058 const SkPaint*) SK_OVERRIDE;
reed@android.com8a1c16f2008-12-17 15:59:43 +000059 virtual void drawVertices(VertexMode, int vertexCount,
60 const SkPoint vertices[], const SkPoint texs[],
61 const SkColor colors[], SkXfermode*,
62 const uint16_t indices[], int indexCount,
reed@google.com2d4297c2011-10-06 13:14:12 +000063 const SkPaint&) SK_OVERRIDE;
64 virtual void drawData(const void*, size_t) SK_OVERRIDE;
robertphillips@google.com0a4805e2013-05-29 13:24:23 +000065 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
66 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
67 virtual void endCommentGroup() SK_OVERRIDE;
junov@chromium.org8f9ecbd2012-02-13 21:53:45 +000068 virtual bool isDrawingToLayer() const SK_OVERRIDE;
reed@android.com8a1c16f2008-12-17 15:59:43 +000069
junov@chromium.org3f5ecd62013-01-22 18:01:26 +000070 void addFontMetricsTopBottom(const SkPaint& paint, const SkFlatData&,
reed@google.com45954262012-12-07 17:14:40 +000071 SkScalar minY, SkScalar maxY);
vandebo@chromium.org74b46192012-01-28 01:45:11 +000072
robertphillips9b14f262014-06-04 05:40:44 -070073 const SkTDArray<const SkPicture* >& getPictureRefs() const {
reed@android.com8a1c16f2008-12-17 15:59:43 +000074 return fPictureRefs;
75 }
vandebo@chromium.org74b46192012-01-28 01:45:11 +000076
robertphillips0bdbea72014-06-11 11:37:55 -070077 SkData* opData(bool deepCopy) const {
78 this->validate(fWriter.bytesWritten(), 0);
79
80 if (fWriter.bytesWritten() == 0) {
81 return SkData::NewEmpty();
82 }
83
84 if (deepCopy) {
85 return SkData::NewWithCopy(fWriter.contiguousArray(), fWriter.bytesWritten());
86 }
87
88 return fWriter.snapshotAsData();
89 }
90
robertphillipse26e65e2014-06-12 05:51:22 -070091 const SkPathHeap* pathHeap() const {
92 return fPathHeap.get();
robertphillips0bdbea72014-06-11 11:37:55 -070093 }
94
95 const SkPictureContentInfo& contentInfo() const {
96 return fContentInfo;
97 }
98
junov@chromium.org4866cc02012-06-01 21:23:07 +000099 void setFlags(uint32_t recordFlags) {
100 fRecordFlags = recordFlags;
101 }
reed@android.com8a1c16f2008-12-17 15:59:43 +0000102
103 const SkWriter32& writeStream() const {
104 return fWriter;
105 }
106
reed@google.comd86e7ab2012-09-27 20:31:31 +0000107 void beginRecording();
junov@chromium.orga6c9e0e2012-07-12 17:47:34 +0000108 void endRecording();
reed@google.comd86e7ab2012-09-27 20:31:31 +0000109
commit-bot@chromium.orge494dbd2014-03-04 19:08:57 +0000110 void internalOnly_EnableOpts(bool optsEnabled) {
111 fOptsEnabled = optsEnabled;
112 }
113
senorblanco@chromium.org68250c82014-05-06 22:52:55 +0000114protected:
115 void addNoOp();
116
reed@android.com8a1c16f2008-12-17 15:59:43 +0000117private:
commit-bot@chromium.org4b32bd52013-03-15 15:06:03 +0000118 void handleOptimization(int opt);
commit-bot@chromium.orgdcecb162014-04-22 17:54:29 +0000119 size_t recordRestoreOffsetPlaceholder(SkRegion::Op);
robertphillips@google.com5a63f242014-02-04 20:07:50 +0000120 void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffset);
junov@chromium.orge3dbedb2012-07-09 16:03:55 +0000121
robertphillips@google.com105a4a52014-02-11 15:10:40 +0000122#ifndef SK_COLLAPSE_MATRIX_CLIP_STATE
reed@google.comffacd3c2012-08-30 15:31:23 +0000123 SkTDArray<int32_t> fRestoreOffsetStack;
junov@chromium.org8f9ecbd2012-02-13 21:53:45 +0000124 int fFirstSavedLayerIndex;
125 enum {
126 kNoSavedLayerIndex = -1
127 };
robertphillips@google.com105a4a52014-02-11 15:10:40 +0000128#endif
reed@android.com8a1c16f2008-12-17 15:59:43 +0000129
commit-bot@chromium.org210ae2a2014-02-27 17:40:13 +0000130 SkTDArray<uint32_t> fCullOffsetStack;
131
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000132 /*
133 * Write the 'drawType' operation and chunk size to the skp. 'size'
skia.committer@gmail.comce8343d2013-02-16 07:01:31 +0000134 * can potentially be increased if the chunk size needs its own storage
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000135 * location (i.e., it overflows 24 bits).
136 * Returns the start offset of the chunk. This is the location at which
137 * the opcode & size are stored.
skia.committer@gmail.comce8343d2013-02-16 07:01:31 +0000138 * TODO: since we are handing the size into here we could call reserve
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000139 * and then return a pointer to the memory storage. This could decrease
140 * allocation overhead but could lead to more wasted space (the tail
141 * end of blocks could go unused). Possibly add a second addDraw that
142 * operates in this manner.
143 */
commit-bot@chromium.orgdcecb162014-04-22 17:54:29 +0000144 size_t addDraw(DrawType drawType, size_t* size) {
reed@google.com44699382013-10-31 17:28:30 +0000145 size_t offset = fWriter.bytesWritten();
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000146
reed@google.com97af1a62012-08-28 12:19:02 +0000147 this->predrawNotify();
148
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000149 #ifdef SK_DEBUG_TRACE
reed@android.com8a1c16f2008-12-17 15:59:43 +0000150 SkDebugf("add %s\n", DrawTypeToString(drawType));
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000151 #endif
152
153 SkASSERT(0 != *size);
154 SkASSERT(((uint8_t) drawType) == drawType);
155
156 if (0 != (*size & ~MASK_24) || *size == MASK_24) {
157 fWriter.writeInt(PACK_8_24(drawType, MASK_24));
158 *size += 1;
commit-bot@chromium.orgdcecb162014-04-22 17:54:29 +0000159 fWriter.writeInt(SkToU32(*size));
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000160 } else {
commit-bot@chromium.orgdcecb162014-04-22 17:54:29 +0000161 fWriter.writeInt(PACK_8_24(drawType, SkToU32(*size)));
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000162 }
163
164 return offset;
vandebo@chromium.org74b46192012-01-28 01:45:11 +0000165 }
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000166
reed@android.com8a1c16f2008-12-17 15:59:43 +0000167 void addInt(int value) {
168 fWriter.writeInt(value);
169 }
170 void addScalar(SkScalar scalar) {
171 fWriter.writeScalar(scalar);
172 }
vandebo@chromium.org74b46192012-01-28 01:45:11 +0000173
commit-bot@chromium.org8016f792014-03-07 15:53:01 +0000174 // The command at 'offset' in the skp uses the specified bitmap
commit-bot@chromium.org8016f792014-03-07 15:53:01 +0000175 int addBitmap(const SkBitmap& bitmap);
reed@android.com8a1c16f2008-12-17 15:59:43 +0000176 void addMatrix(const SkMatrix& matrix);
junov@chromium.orgf3b12232013-01-22 17:50:47 +0000177 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr(&paint); }
178 const SkFlatData* addPaintPtr(const SkPaint* paint);
commit-bot@chromium.orgcf7be952013-08-22 17:19:52 +0000179 void addFlatPaint(const SkFlatData* flatPaint);
reed@android.com8a1c16f2008-12-17 15:59:43 +0000180 void addPath(const SkPath& path);
robertphillips9b14f262014-06-04 05:40:44 -0700181 void addPicture(const SkPicture* picture);
reed@android.com8a1c16f2008-12-17 15:59:43 +0000182 void addPoint(const SkPoint& point);
183 void addPoints(const SkPoint pts[], int count);
184 void addRect(const SkRect& rect);
185 void addRectPtr(const SkRect* rect);
reed@google.comf0b5e112011-09-07 11:57:34 +0000186 void addIRect(const SkIRect& rect);
reed@android.com8a1c16f2008-12-17 15:59:43 +0000187 void addIRectPtr(const SkIRect* rect);
reed@google.com4ed0fb72012-12-12 20:48:18 +0000188 void addRRect(const SkRRect&);
reed@android.com8a1c16f2008-12-17 15:59:43 +0000189 void addRegion(const SkRegion& region);
190 void addText(const void* text, size_t byteLength);
191
junov@chromium.org4866cc02012-06-01 21:23:07 +0000192 int find(const SkBitmap& bitmap);
193
reed@android.com8a1c16f2008-12-17 15:59:43 +0000194#ifdef SK_DEBUG_DUMP
195public:
196 void dumpMatrices();
197 void dumpPaints();
198#endif
199
200#ifdef SK_DEBUG_SIZE
201public:
vandebo@chromium.org74b46192012-01-28 01:45:11 +0000202 size_t size() const;
reed@android.com8a1c16f2008-12-17 15:59:43 +0000203 int bitmaps(size_t* size) const;
204 int matrices(size_t* size) const;
205 int paints(size_t* size) const;
206 int paths(size_t* size) const;
207 int regions(size_t* size) const;
208 size_t streamlen() const;
vandebo@chromium.org74b46192012-01-28 01:45:11 +0000209
reed@android.com8a1c16f2008-12-17 15:59:43 +0000210 size_t fPointBytes, fRectBytes, fTextBytes;
211 int fPointWrites, fRectWrites, fTextWrites;
212#endif
213
214#ifdef SK_DEBUG_VALIDATE
215public:
robertphillips@google.com8b169312013-10-15 17:47:36 +0000216 void validate(size_t initialOffset, uint32_t size) const;
reed@android.com8a1c16f2008-12-17 15:59:43 +0000217private:
218 void validateBitmaps() const;
219 void validateMatrices() const;
220 void validatePaints() const;
221 void validatePaths() const;
222 void validateRegions() const;
223#else
224public:
commit-bot@chromium.orgdcecb162014-04-22 17:54:29 +0000225 void validate(size_t initialOffset, size_t size) const {
reed@google.com44699382013-10-31 17:28:30 +0000226 SkASSERT(fWriter.bytesWritten() == initialOffset + size);
robertphillips@google.com2ca1aaa2013-02-15 13:47:37 +0000227 }
reed@android.com8a1c16f2008-12-17 15:59:43 +0000228#endif
229
rileya@google.com9f5898d2012-09-11 20:21:44 +0000230protected:
reed@google.com76f10a32014-02-05 15:32:21 +0000231 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE;
commit-bot@chromium.orgc3bd8af2014-02-13 17:14:46 +0000232 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE {
233 return NULL;
234 }
commit-bot@chromium.orge54a23f2014-03-12 20:21:48 +0000235
Florin Malita5f6102d2014-06-30 10:13:28 -0400236 virtual void willSave() SK_OVERRIDE;
commit-bot@chromium.orge54a23f2014-03-12 20:21:48 +0000237 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE;
238 virtual void willRestore() SK_OVERRIDE;
239
commit-bot@chromium.org44c48d02014-03-13 20:03:58 +0000240 virtual void didConcat(const SkMatrix&) SK_OVERRIDE;
241 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE;
242
commit-bot@chromium.orged9806f2014-02-21 02:32:36 +0000243 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE;
commit-bot@chromium.org210ae2a2014-02-27 17:40:13 +0000244 virtual void onPushCull(const SkRect&) SK_OVERRIDE;
245 virtual void onPopCull() SK_OVERRIDE;
reed@google.com76f10a32014-02-05 15:32:21 +0000246
reed@google.come0d9ce82014-04-23 04:00:17 +0000247 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y,
248 const SkPaint&) SK_OVERRIDE;
249 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[],
250 const SkPaint&) SK_OVERRIDE;
251 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[],
252 SkScalar constY, const SkPaint&) SK_OVERRIDE;
253 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
254 const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE;
255
robertphillips@google.com8f90a892014-02-28 18:19:39 +0000256 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;
257 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;
258 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;
259 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
260
robertphillips9b14f262014-06-04 05:40:44 -0700261 virtual void onDrawPicture(const SkPicture* picture) SK_OVERRIDE;
262
commit-bot@chromium.orgcf7be952013-08-22 17:19:52 +0000263 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been
264 // tweaked by paint.computeFastBounds().
265 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbot[2]);
266
267 // Make sure that flat has fTopBot written.
268 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) {
269 if (!flat.isTopBotWritten()) {
270 ComputeFontMetricsTopBottom(paint, flat.writableTopBot());
271 SkASSERT(flat.isTopBotWritten());
272 }
273 }
274 // Will return a cached version when possible.
275 const SkFlatData* getFlatPaintData(const SkPaint& paint);
276 /**
277 * SkBBoxRecord::drawPosTextH gets a flat paint and uses it,
278 * then it calls this, using the extra parameter, to avoid duplication.
279 */
280 void drawPosTextHImpl(const void* text, size_t byteLength,
281 const SkScalar xpos[], SkScalar constY,
282 const SkPaint& paint, const SkFlatData* flatPaintData);
rileya@google.com9f5898d2012-09-11 20:21:44 +0000283
robertphillips@google.com5a63f242014-02-04 20:07:50 +0000284 int addPathToHeap(const SkPath& path); // does not write to ops stream
285
skia.committer@gmail.com1dab4032014-02-05 03:01:48 +0000286 // These entry points allow the writing of matrices, clips, saves &
robertphillips@google.com5a63f242014-02-04 20:07:50 +0000287 // restores to be deferred (e.g., if the MC state is being collapsed and
288 // only written out as needed).
289 void recordConcat(const SkMatrix& matrix);
commit-bot@chromium.orgd9ea09e2014-03-25 17:32:26 +0000290 void recordTranslate(const SkMatrix& matrix);
291 void recordScale(const SkMatrix& matrix);
commit-bot@chromium.orgdcecb162014-04-22 17:54:29 +0000292 size_t recordClipRect(const SkRect& rect, SkRegion::Op op, bool doAA);
293 size_t recordClipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA);
294 size_t recordClipPath(int pathID, SkRegion::Op op, bool doAA);
295 size_t recordClipRegion(const SkRegion& region, SkRegion::Op op);
Florin Malita5f6102d2014-06-30 10:13:28 -0400296 void recordSave();
robertphillips@google.com5a63f242014-02-04 20:07:50 +0000297 void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags flags);
robertphillips@google.com105a4a52014-02-11 15:10:40 +0000298 void recordRestore(bool fillInSkips = true);
robertphillips@google.com5a63f242014-02-04 20:07:50 +0000299
rileya@google.com9f5898d2012-09-11 20:21:44 +0000300 // These are set to NULL in our constructor, but may be changed by
301 // subclasses, in which case they will be SkSafeUnref'd in our destructor.
302 SkBBoxHierarchy* fBoundingHierarchy;
303 SkPictureStateTree* fStateTree;
304
robertphillips@google.com801cee12012-10-19 19:06:11 +0000305 // Allocated in the constructor and managed by this class.
djsollen@google.comc9ab9872012-08-29 18:52:07 +0000306 SkBitmapHeap* fBitmapHeap;
robertphillips@google.com801cee12012-10-19 19:06:11 +0000307
308private:
robertphillips@google.com105a4a52014-02-11 15:10:40 +0000309 friend class MatrixClipState; // for access to *Impl methods
310 friend class SkMatrixClipStateMgr; // for access to *Impl methods
311
robertphillips0bdbea72014-06-11 11:37:55 -0700312 SkPictureContentInfo fContentInfo;
313 SkAutoTUnref<SkPathHeap> fPathHeap;
314
djsollen@google.com21830d92012-08-07 19:49:41 +0000315 SkChunkFlatController fFlattenableHeap;
junov@chromium.org4866cc02012-06-01 21:23:07 +0000316
djsollen@google.comd2700ee2012-05-30 16:54:13 +0000317 SkPaintDictionary fPaints;
djsollen@google.comd2700ee2012-05-30 16:54:13 +0000318
reed@android.com8a1c16f2008-12-17 15:59:43 +0000319 SkWriter32 fWriter;
320
reed@android.com09b84a02009-06-26 20:22:26 +0000321 // we ref each item in these arrays
robertphillips9b14f262014-06-04 05:40:44 -0700322 SkTDArray<const SkPicture*> fPictureRefs;
reed@android.com8a1c16f2008-12-17 15:59:43 +0000323
reed@android.comae814c82009-02-13 14:56:09 +0000324 uint32_t fRecordFlags;
commit-bot@chromium.orge494dbd2014-03-04 19:08:57 +0000325 bool fOptsEnabled;
326 int fInitialSaveCount;
reed@android.comae814c82009-02-13 14:56:09 +0000327
robertphillipsdb539902014-07-01 08:47:04 -0700328 friend class SkPictureData;
junov@chromium.org1cc8f6f2012-02-22 21:00:42 +0000329 friend class SkPictureTester; // for unit testing
reed@android.com8a1c16f2008-12-17 15:59:43 +0000330
robertphillips@google.com105a4a52014-02-11 15:10:40 +0000331#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
332 SkMatrixClipStateMgr fMCMgr;
333#endif
334
reed@android.com8a1c16f2008-12-17 15:59:43 +0000335 typedef SkCanvas INHERITED;
336};
337
338#endif