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