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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "public/platform/WebImageLayer.h" | 44 #include "public/platform/WebImageLayer.h" |
45 #include "public/platform/WebLayerClient.h" | 45 #include "public/platform/WebLayerClient.h" |
46 #include "public/platform/WebLayerScrollClient.h" | 46 #include "public/platform/WebLayerScrollClient.h" |
47 #include "public/platform/WebNinePatchLayer.h" | 47 #include "public/platform/WebNinePatchLayer.h" |
48 #include "wtf/OwnPtr.h" | 48 #include "wtf/OwnPtr.h" |
49 #include "wtf/PassOwnPtr.h" | 49 #include "wtf/PassOwnPtr.h" |
50 #include "wtf/Vector.h" | 50 #include "wtf/Vector.h" |
51 | 51 |
52 namespace blink { | 52 namespace blink { |
53 | 53 |
| 54 class DisplayItemList; |
54 class FloatRect; | 55 class FloatRect; |
55 class GraphicsContext; | 56 class GraphicsContext; |
56 class GraphicsLayer; | 57 class GraphicsLayer; |
57 class GraphicsLayerFactory; | 58 class GraphicsLayerFactory; |
58 class GraphicsLayerFactoryChromium; | 59 class GraphicsLayerFactoryChromium; |
59 class Image; | 60 class Image; |
60 class JSONObject; | 61 class JSONObject; |
61 class ScrollableArea; | 62 class ScrollableArea; |
62 class WebCompositorAnimation; | 63 class WebCompositorAnimation; |
63 class WebLayer; | 64 class WebLayer; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 // GraphicsContextPainter implementation. | 236 // GraphicsContextPainter implementation. |
236 virtual void paint(GraphicsContext&, const IntRect& clip) override; | 237 virtual void paint(GraphicsContext&, const IntRect& clip) override; |
237 | 238 |
238 // WebCompositorAnimationDelegate implementation. | 239 // WebCompositorAnimationDelegate implementation. |
239 virtual void notifyAnimationStarted(double monotonicTime, int group) overrid
e; | 240 virtual void notifyAnimationStarted(double monotonicTime, int group) overrid
e; |
240 virtual void notifyAnimationFinished(double monotonicTime, int group) overri
de; | 241 virtual void notifyAnimationFinished(double monotonicTime, int group) overri
de; |
241 | 242 |
242 // WebLayerScrollClient implementation. | 243 // WebLayerScrollClient implementation. |
243 virtual void didScroll() override; | 244 virtual void didScroll() override; |
244 | 245 |
| 246 DisplayItemList& displayItemList(); |
| 247 |
245 protected: | 248 protected: |
246 String debugName(WebLayer*) const; | 249 String debugName(WebLayer*) const; |
247 | 250 |
248 explicit GraphicsLayer(GraphicsLayerClient*); | 251 explicit GraphicsLayer(GraphicsLayerClient*); |
249 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to
be friends. | 252 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to
be friends. |
250 friend class GraphicsLayerFactoryChromium; | 253 friend class GraphicsLayerFactoryChromium; |
| 254 // for testing |
| 255 friend class FakeGraphicsLayerFactory; |
251 | 256 |
252 // Exposed for tests. | 257 // Exposed for tests. |
253 virtual WebLayer* contentsLayer() const { return m_contentsLayer; } | 258 virtual WebLayer* contentsLayer() const { return m_contentsLayer; } |
254 | 259 |
255 private: | 260 private: |
256 // Callback from the underlying graphics system to draw layer contents. | 261 // Callback from the underlying graphics system to draw layer contents. |
257 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip); | 262 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip); |
258 | 263 |
259 // Adds a child without calling updateChildList(), so that adding children | 264 // Adds a child without calling updateChildList(), so that adding children |
260 // can be batched before updating. | 265 // can be batched before updating. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // on. | 339 // on. |
335 int m_contentsLayerId; | 340 int m_contentsLayerId; |
336 | 341 |
337 Vector<LinkHighlightClient*> m_linkHighlights; | 342 Vector<LinkHighlightClient*> m_linkHighlights; |
338 | 343 |
339 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; | 344 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; |
340 | 345 |
341 ScrollableArea* m_scrollableArea; | 346 ScrollableArea* m_scrollableArea; |
342 GraphicsLayerDebugInfo m_debugInfo; | 347 GraphicsLayerDebugInfo m_debugInfo; |
343 int m_3dRenderingContext; | 348 int m_3dRenderingContext; |
| 349 |
| 350 OwnPtr<DisplayItemList> m_displayItemList; |
344 }; | 351 }; |
345 | 352 |
346 } // namespace blink | 353 } // namespace blink |
347 | 354 |
348 #ifndef NDEBUG | 355 #ifndef NDEBUG |
349 // Outside the blink namespace for ease of invocation from gdb. | 356 // Outside the blink namespace for ease of invocation from gdb. |
350 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 357 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
351 #endif | 358 #endif |
352 | 359 |
353 #endif // GraphicsLayer_h | 360 #endif // GraphicsLayer_h |
OLD | NEW |