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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 enum { | 49 enum { |
50 LayerTreeNormal = 0, | 50 LayerTreeNormal = 0, |
51 LayerTreeIncludesDebugInfo = 1 << 0, // Dump extra debugging info like layer
addresses. | 51 LayerTreeIncludesDebugInfo = 1 << 0, // Dump extra debugging info like layer
addresses. |
52 LayerTreeIncludesPaintInvalidationRects = 1 << 1, | 52 LayerTreeIncludesPaintInvalidationRects = 1 << 1, |
53 LayerTreeIncludesPaintingPhases = 1 << 2, | 53 LayerTreeIncludesPaintingPhases = 1 << 2, |
54 LayerTreeIncludesRootLayer = 1 << 3, | 54 LayerTreeIncludesRootLayer = 1 << 3, |
55 LayerTreeIncludesClipAndScrollParents = 1 << 4, | 55 LayerTreeIncludesClipAndScrollParents = 1 << 4, |
56 LayerTreeIncludesScrollBlocksOn = 1 << 5, | 56 LayerTreeIncludesScrollBlocksOn = 1 << 5, |
57 LayerTreeIncludesPaintInvalidationObjects = 1 << 6, | 57 LayerTreeIncludesPaintInvalidationObjects = 1 << 6, |
| 58 LayerTreeIncludesCompositingReasons = 1 << 7, |
58 }; | 59 }; |
59 typedef unsigned LayerTreeFlags; | 60 typedef unsigned LayerTreeFlags; |
60 | 61 |
61 class PLATFORM_EXPORT GraphicsLayerClient { | 62 class PLATFORM_EXPORT GraphicsLayerClient { |
62 public: | 63 public: |
63 virtual ~GraphicsLayerClient() {} | 64 virtual ~GraphicsLayerClient() {} |
64 | 65 |
65 // Callback for when compositor animation started. | 66 // Callback for when compositor animation started. |
66 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me, int group) { }; | 67 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me, int group) { }; |
67 | 68 |
68 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& inClip) = 0; | 69 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& inClip) = 0; |
69 virtual bool isTrackingPaintInvalidations() const { return false; } | 70 virtual bool isTrackingPaintInvalidations() const { return false; } |
70 | 71 |
71 virtual String debugName(const GraphicsLayer*) = 0; | 72 virtual String debugName(const GraphicsLayer*) = 0; |
72 | 73 |
73 #if ENABLE(ASSERT) | 74 #if ENABLE(ASSERT) |
74 // CompositedLayerMapping overrides this to verify that it is not | 75 // CompositedLayerMapping overrides this to verify that it is not |
75 // currently painting contents. An ASSERT fails, if it is. | 76 // currently painting contents. An ASSERT fails, if it is. |
76 // This is executed in GraphicsLayer construction and destruction | 77 // This is executed in GraphicsLayer construction and destruction |
77 // to verify that we don't create or destroy GraphicsLayers | 78 // to verify that we don't create or destroy GraphicsLayers |
78 // while painting. | 79 // while painting. |
79 virtual void verifyNotPainting() { } | 80 virtual void verifyNotPainting() { } |
80 #endif | 81 #endif |
81 }; | 82 }; |
82 | 83 |
83 } // namespace blink | 84 } // namespace blink |
84 | 85 |
85 #endif // GraphicsLayerClient_h | 86 #endif // GraphicsLayerClient_h |
OLD | NEW |