| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 typedef unsigned GraphicsLayerPaintingPhase; | 46 typedef unsigned GraphicsLayerPaintingPhase; |
| 47 | 47 |
| 48 enum AnimatedPropertyID { | 48 enum AnimatedPropertyID { |
| 49 AnimatedPropertyInvalid, | 49 AnimatedPropertyInvalid, |
| 50 AnimatedPropertyWebkitTransform, | 50 AnimatedPropertyWebkitTransform, |
| 51 AnimatedPropertyOpacity, | 51 AnimatedPropertyOpacity, |
| 52 AnimatedPropertyBackgroundColor, | 52 AnimatedPropertyBackgroundColor, |
| 53 AnimatedPropertyWebkitFilter | 53 AnimatedPropertyWebkitFilter |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 enum { |
| 57 LayerTreeNormal = 0, |
| 58 LayerTreeIncludesDebugInfo = 1 << 0, // Dump extra debugging info like layer
addresses. |
| 59 LayerTreeIncludesRepaintRects = 1 << 1, |
| 60 LayerTreeIncludesPaintingPhases = 1 << 2 |
| 61 }; |
| 62 typedef unsigned LayerTreeFlags; |
| 63 |
| 56 class GraphicsLayerClient { | 64 class GraphicsLayerClient { |
| 57 public: | 65 public: |
| 58 virtual ~GraphicsLayerClient() {} | 66 virtual ~GraphicsLayerClient() {} |
| 59 | 67 |
| 60 // Callback for when hardware-accelerated animation started. | 68 // Callback for when hardware-accelerated animation started. |
| 61 virtual void notifyAnimationStarted(const GraphicsLayer*, double time) = 0; | 69 virtual void notifyAnimationStarted(const GraphicsLayer*, double time) = 0; |
| 62 | 70 |
| 63 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& inClip) = 0; | 71 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& inClip) = 0; |
| 64 virtual void didCommitChangesForLayer(const GraphicsLayer*) const { } | 72 virtual void didCommitChangesForLayer(const GraphicsLayer*) const { } |
| 65 | 73 |
| 66 // Provides current transform (taking transform-origin and animations into a
ccount). Input matrix has been | 74 // Provides current transform (taking transform-origin and animations into a
ccount). Input matrix has been |
| 67 // initialized to identity already. Returns false if the layer has no transf
orm. | 75 // initialized to identity already. Returns false if the layer has no transf
orm. |
| 68 virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&
) const { return false; } | 76 virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&
) const { return false; } |
| 69 | 77 |
| 70 virtual bool isTrackingRepaints() const { return false; } | 78 virtual bool isTrackingRepaints() const { return false; } |
| 71 | 79 |
| 72 #ifndef NDEBUG | 80 #ifndef NDEBUG |
| 73 // RenderLayerBacking overrides this to verify that it is not | 81 // RenderLayerBacking overrides this to verify that it is not |
| 74 // currently painting contents. An ASSERT fails, if it is. | 82 // currently painting contents. An ASSERT fails, if it is. |
| 75 // This is executed in GraphicsLayer construction and destruction | 83 // This is executed in GraphicsLayer construction and destruction |
| 76 // to verify that we don't create or destroy GraphicsLayers | 84 // to verify that we don't create or destroy GraphicsLayers |
| 77 // while painting. | 85 // while painting. |
| 78 virtual void verifyNotPainting() { } | 86 virtual void verifyNotPainting() { } |
| 79 #endif | 87 #endif |
| 80 }; | 88 }; |
| 81 | 89 |
| 82 } // namespace WebCore | 90 } // namespace WebCore |
| 83 | 91 |
| 84 #endif // GraphicsLayerClient_h | 92 #endif // GraphicsLayerClient_h |
| OLD | NEW |