/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file.
*/ #ifndef SkPictureFlat_DEFINED #define SkPictureFlat_DEFINED
/* * Note: While adding new DrawTypes, it is necessary to add to the end of this list * and update LAST_DRAWTYPE_ENUM to avoid having the code read older skps wrong. * (which can cause segfaults) * * Reordering can be done during version updates.
*/ enum DrawType {
UNUSED,
CLIP_PATH,
CLIP_REGION,
CLIP_RECT,
CLIP_RRECT,
CONCAT,
DRAW_BITMAP_RETIRED_2016_REMOVED_2018,
DRAW_BITMAP_MATRIX_RETIRED_2016_REMOVED_2018,
DRAW_BITMAP_NINE_RETIRED_2016_REMOVED_2018,
DRAW_BITMAP_RECT_RETIRED_2016_REMOVED_2018,
DRAW_CLEAR,
DRAW_DATA,
DRAW_OVAL,
DRAW_PAINT,
DRAW_PATH,
DRAW_PICTURE,
DRAW_POINTS,
DRAW_POS_TEXT_REMOVED_1_2019,
DRAW_POS_TEXT_TOP_BOTTOM_REMOVED_1_2019,
DRAW_POS_TEXT_H_REMOVED_1_2019,
DRAW_POS_TEXT_H_TOP_BOTTOM_REMOVED_1_2019,
DRAW_RECT,
DRAW_RRECT,
DRAW_SPRITE_RETIRED_2015_REMOVED_2018,
DRAW_TEXT_REMOVED_1_2019,
DRAW_TEXT_ON_PATH_RETIRED_08_2018_REMOVED_10_2018,
DRAW_TEXT_TOP_BOTTOM_REMOVED_1_2019,
DRAW_VERTICES_RETIRED_03_2017_REMOVED_01_2018,
RESTORE,
ROTATE,
SAVE,
SAVE_LAYER_SAVEFLAGS_DEPRECATED_2015_REMOVED_12_2020,
SCALE,
SET_MATRIX,
SKEW,
TRANSLATE,
NOOP,
BEGIN_COMMENT_GROUP_obsolete,
COMMENT_obsolete,
END_COMMENT_GROUP_obsolete,
// new ops -- feel free to re-alphabetize on next version bump
DRAW_DRRECT,
PUSH_CULL, // deprecated, M41 was last Chromium version to write this to an .skp
POP_CULL, // deprecated, M41 was last Chromium version to write this to an .skp
DRAW_PATCH, // could not add in aphabetical order
DRAW_PICTURE_MATRIX_PAINT,
DRAW_TEXT_BLOB,
DRAW_IMAGE,
DRAW_IMAGE_RECT_STRICT_obsolete,
DRAW_ATLAS,
DRAW_IMAGE_NINE,
DRAW_IMAGE_RECT,
// But old SKPs may have been serialized with the SK_SUPPORT_DEPRECATED_CLIPOP flag, so might // encounter expanding clip ops. Thus, this returns the clip op as the more general Region::Op. staticinline SkRegion::Op ClipParams_unpackRegionOp(SkReadBuffer* buffer, uint32_t packed) {
uint32_t unpacked = packed & 0xF; if (buffer->validate(unpacked <= SkRegion::kIntersect_Op ||
(unpacked <= SkRegion::kReplace_Op &&
buffer->isVersionLT(SkPicturePriv::kNoExpandingClipOps)))) { returnstatic_cast<SkRegion::Op>(unpacked);
} return SkRegion::kIntersect_Op;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.