OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 void setScrollableArea(ScrollableArea*, bool isViewport); | 240 void setScrollableArea(ScrollableArea*, bool isViewport); |
241 ScrollableArea* scrollableArea() const { return m_scrollableArea; } | 241 ScrollableArea* scrollableArea() const { return m_scrollableArea; } |
242 | 242 |
243 WebContentLayer* contentLayer() const { return m_layer.get(); } | 243 WebContentLayer* contentLayer() const { return m_layer.get(); } |
244 | 244 |
245 static void registerContentsLayer(WebLayer*); | 245 static void registerContentsLayer(WebLayer*); |
246 static void unregisterContentsLayer(WebLayer*); | 246 static void unregisterContentsLayer(WebLayer*); |
247 | 247 |
248 // GraphicsContextPainter implementation. | 248 // GraphicsContextPainter implementation. |
249 void paint(GraphicsContext&, const IntRect* clip) override; | 249 void paint(GraphicsContext&, const IntRect* interestRect) override; |
250 | 250 |
251 // WebCompositorAnimationDelegate implementation. | 251 // WebCompositorAnimationDelegate implementation. |
252 void notifyAnimationStarted(double monotonicTime, int group) override; | 252 void notifyAnimationStarted(double monotonicTime, int group) override; |
253 void notifyAnimationFinished(double monotonicTime, int group) override; | 253 void notifyAnimationFinished(double monotonicTime, int group) override; |
254 | 254 |
255 // WebLayerScrollClient implementation. | 255 // WebLayerScrollClient implementation. |
256 void didScroll() override; | 256 void didScroll() override; |
257 | 257 |
258 PaintController* paintController() override; | 258 PaintController* paintController() override; |
259 | 259 |
260 // Exposed for tests. | 260 // Exposed for tests. |
261 WebLayer* contentsLayer() const { return m_contentsLayer; } | 261 WebLayer* contentsLayer() const { return m_contentsLayer; } |
262 | 262 |
263 static void setDrawDebugRedFillForTesting(bool); | 263 static void setDrawDebugRedFillForTesting(bool); |
264 ContentLayerDelegate* contentLayerDelegateForTesting() const { return m_cont
entLayerDelegate.get(); } | 264 ContentLayerDelegate* contentLayerDelegateForTesting() const { return m_cont
entLayerDelegate.get(); } |
265 | 265 |
266 #ifndef NDEBUG | |
267 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } | 266 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } |
268 String debugName() const { return m_client->debugName(this) + " debug red fi
ll"; } | 267 String debugName() const { return m_client->debugName(this); } |
269 #endif | |
270 | 268 |
271 protected: | 269 protected: |
272 String debugName(WebLayer*) const; | 270 String debugName(WebLayer*) const; |
273 | 271 |
274 explicit GraphicsLayer(GraphicsLayerClient*); | 272 explicit GraphicsLayer(GraphicsLayerClient*); |
275 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to
be friends. | 273 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to
be friends. |
276 friend class GraphicsLayerFactoryChromium; | 274 friend class GraphicsLayerFactoryChromium; |
277 // for testing | 275 // for testing |
| 276 friend class CompositedLayerMappingTest; |
278 friend class FakeGraphicsLayerFactory; | 277 friend class FakeGraphicsLayerFactory; |
279 | 278 |
280 private: | 279 private: |
281 // Adds a child without calling updateChildList(), so that adding children | 280 // Adds a child without calling updateChildList(), so that adding children |
282 // can be batched before updating. | 281 // can be batched before updating. |
283 void addChildInternal(GraphicsLayer*); | 282 void addChildInternal(GraphicsLayer*); |
284 | 283 |
285 #if ENABLE(ASSERT) | 284 #if ENABLE(ASSERT) |
286 bool hasAncestor(GraphicsLayer*) const; | 285 bool hasAncestor(GraphicsLayer*) const; |
287 #endif | 286 #endif |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 Vector<LinkHighlight*> m_linkHighlights; | 366 Vector<LinkHighlight*> m_linkHighlights; |
368 | 367 |
369 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; | 368 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; |
370 | 369 |
371 GC_PLUGIN_IGNORE("509911") | 370 GC_PLUGIN_IGNORE("509911") |
372 ScrollableArea* m_scrollableArea; | 371 ScrollableArea* m_scrollableArea; |
373 GraphicsLayerDebugInfo m_debugInfo; | 372 GraphicsLayerDebugInfo m_debugInfo; |
374 int m_3dRenderingContext; | 373 int m_3dRenderingContext; |
375 | 374 |
376 OwnPtr<PaintController> m_paintController; | 375 OwnPtr<PaintController> m_paintController; |
| 376 |
| 377 IntRect m_previousInterestRect; |
377 }; | 378 }; |
378 | 379 |
379 } // namespace blink | 380 } // namespace blink |
380 | 381 |
381 #ifndef NDEBUG | 382 #ifndef NDEBUG |
382 // Outside the blink namespace for ease of invocation from gdb. | 383 // Outside the blink namespace for ease of invocation from gdb. |
383 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 384 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
384 #endif | 385 #endif |
385 | 386 |
386 #endif // GraphicsLayer_h | 387 #endif // GraphicsLayer_h |
OLD | NEW |