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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 LayerTreeIncludesRootLayer = 1 << 3, | 57 LayerTreeIncludesRootLayer = 1 << 3, |
58 LayerTreeIncludesClipAndScrollParents = 1 << 4 | 58 LayerTreeIncludesClipAndScrollParents = 1 << 4 |
59 }; | 59 }; |
60 typedef unsigned LayerTreeFlags; | 60 typedef unsigned LayerTreeFlags; |
61 | 61 |
62 class PLATFORM_EXPORT GraphicsLayerClient { | 62 class PLATFORM_EXPORT GraphicsLayerClient { |
63 public: | 63 public: |
64 virtual ~GraphicsLayerClient() {} | 64 virtual ~GraphicsLayerClient() {} |
65 | 65 |
66 // Callback for when hardware-accelerated animation started. | 66 // Callback for when hardware-accelerated animation started. |
67 virtual void notifyAnimationStarted(const GraphicsLayer*, double wallClockTi
me, double monotonicTime) = 0; | 67 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me) = 0; |
68 | 68 |
69 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; |
70 virtual bool isTrackingRepaints() const { return false; } | 70 virtual bool isTrackingRepaints() const { return false; } |
71 | 71 |
72 virtual String debugName(const GraphicsLayer*) = 0; | 72 virtual String debugName(const GraphicsLayer*) = 0; |
73 | 73 |
74 #ifndef NDEBUG | 74 #ifndef NDEBUG |
75 // CompositedLayerMapping overrides this to verify that it is not | 75 // CompositedLayerMapping overrides this to verify that it is not |
76 // currently painting contents. An ASSERT fails, if it is. | 76 // currently painting contents. An ASSERT fails, if it is. |
77 // This is executed in GraphicsLayer construction and destruction | 77 // This is executed in GraphicsLayer construction and destruction |
78 // to verify that we don't create or destroy GraphicsLayers | 78 // to verify that we don't create or destroy GraphicsLayers |
79 // while painting. | 79 // while painting. |
80 virtual void verifyNotPainting() { } | 80 virtual void verifyNotPainting() { } |
81 #endif | 81 #endif |
82 }; | 82 }; |
83 | 83 |
84 } // namespace WebCore | 84 } // namespace WebCore |
85 | 85 |
86 #endif // GraphicsLayerClient_h | 86 #endif // GraphicsLayerClient_h |
OLD | NEW |