/* * Copyright 2014 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkSurfaceProps_DEFINED #define SkSurfaceProps_DEFINED #include "include/core/SkScalar.h" #include "include/core/SkTypes.h" #include "include/private/base/SkTo.h" /** * Description of how the LCD strips are arranged for each pixel. If this is unknown, or the * pixels are meant to be "portable" and/or transformed before showing (e.g. rotated, scaled) * then use kUnknown_SkPixelGeometry. */ enum SkPixelGeometry { … }; // Returns true iff geo is a known geometry and is RGB. static inline bool SkPixelGeometryIsRGB(SkPixelGeometry geo) { … } // Returns true iff geo is a known geometry and is BGR. static inline bool SkPixelGeometryIsBGR(SkPixelGeometry geo) { … } // Returns true iff geo is a known geometry and is horizontal. static inline bool SkPixelGeometryIsH(SkPixelGeometry geo) { … } // Returns true iff geo is a known geometry and is vertical. static inline bool SkPixelGeometryIsV(SkPixelGeometry geo) { … } /** * Describes properties and constraints of a given SkSurface. The rendering engine can parse these * during drawing, and can sometimes optimize its performance (e.g. disabling an expensive * feature). */ class SK_API SkSurfaceProps { … }; #endif