のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

JB43R11 saveViewState その4

その4

     67 namespace WebCore {

     93 class TEST_EXPORT LayerAndroid : public Layer {
     94 public:
     95     typedef enum { UndefinedLayer, WebCoreLayer, UILayer } LayerType;
     96     typedef enum { StandardLayer, ScrollableLayer,
     97                    IFrameLayer, IFrameContentLayer,
     98                    FixedBackgroundLayer,
     99                    FixedBackgroundImageLayer,
    100                    ForegroundBaseLayer,
    101                    CanvasLayer, BaseLayer } SubclassType;
    102     typedef enum { InvalidateNone = 0, InvalidateLayers } InvalidateFlags;
    103 
    104     const char* subclassName() const
    105     {
    106         switch (subclassType()) {
    107             case LayerAndroid::StandardLayer:
    108                 return "StandardLayer";
    109             case LayerAndroid::ScrollableLayer:
    110                 return "ScrollableLayer";
    111             case LayerAndroid::IFrameLayer:
    112                 return "IFrameLayer";
    113             case LayerAndroid::IFrameContentLayer:
    114                 return "IFrameContentLayer";
    115             case LayerAndroid::FixedBackgroundLayer:
    116                 return "FixedBackgroundLayer";
    117             case LayerAndroid::FixedBackgroundImageLayer:
    118                 return "FixedBackgroundImageLayer";
    119             case LayerAndroid::ForegroundBaseLayer:
    120                 return "ForegroundBaseLayer";
    121             case LayerAndroid::CanvasLayer:
    122                 return "CanvasLayer";
    123             case LayerAndroid::BaseLayer:
    124                 return "BaseLayer";
    125         }
    126         return "Undefined";
    127     }

    296 protected:
    307     TransformationMatrix m_drawTransform;
    308     TransformationMatrix m_drawTransformUnfudged;
    309     int m_uniqueId;
    310 
    311 private:
    322 #if DUMP_NAV_CACHE
    323     friend class CachedLayer::Debug; // debugging access only
    324 #endif
    325 
    326     // -------------------------------------------------------------------
    327     // Fields to be serialized
    328     // -------------------------------------------------------------------
    329 
    330     bool m_haveClip;
    331     bool m_backgroundColorSet;
    332 
    333     bool m_backfaceVisibility;
    334     bool m_visible;
    335 
    336 protected:
    337     SkColor m_backgroundColor;
    338 
    339 private:
    340 
    341     bool m_preserves3D;
    342     float m_anchorPointZ;
    343     float m_drawOpacity;
    344 
    345     bool m_isPositionAbsolute;
    346 
    347 protected:
    348     FixedPositioning* m_fixedPosition;
    349 
    350 private:
    351 
    352     typedef HashMap<pair<String, int>, RefPtr<AndroidAnimation> > KeyframesMap;
    353     KeyframesMap m_animations;
    354 
    355     TransformationMatrix m_transform;
    356     TransformationMatrix m_childrenTransform;
    357 
    358     // -------------------------------------------------------------------
    359     // Fields that are not serialized (generated, cached, or non-serializable)
    360     // -------------------------------------------------------------------
    361 
    362     float m_zValue;
    363 
    364     FloatRect m_clippingRect;
    365 
    366     // Note that m_content and m_imageCRC are mutually exclusive;
    367     // m_content is used when WebKit is asked to paint the layer's
    368     // content, while m_imageCRC references an image that we directly
    369     // composite, using the layer's dimensions as a destination rect.
    370     // We do this as if the layer only contains an image, directly compositing
    371     // it is a much faster method than using m_content.
    372     LayerContent* m_content;
    373 
    374 protected:
    375     unsigned m_imageCRC;
    376 
    377 private:
    378 
    379     // used to signal the framework we need a repaint
    380     bool m_hasRunningAnimations;
    381 
    382     float m_scale;
    383 
    384     // We try to not always compute the texture size, as this is quite heavy
    385     static const double s_computeTextureDelay = 0.2; // 200 ms
    386     double m_lastComputeTextureSize;
    387 
    388     RenderLayer* m_owningLayer;
    389 
    390     LayerType m_type;
    391     SubclassType m_subclassType;
    392 
    393     bool m_intrinsicallyComposited;
    394 
    395     Surface* m_surface;
    396 
    397     // link to a replicated layer (used e.g. for reflections)
    398     LayerAndroid* m_replicatedLayer;
    399     FloatPoint    m_replicatedLayerPosition;
    400     LayerAndroid* m_originalLayer;
    401     // link to a mask layer
    402     LayerAndroid* m_maskLayer;
    403 
    404     typedef Layer INHERITED;
    405 };
    406 
    407 }
    408