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