| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "platform/graphics/filters/FilterOperations.h" | 43 #include "platform/graphics/filters/FilterOperations.h" |
| 44 #include "platform/graphics/paint/CachedDisplayItem.h" | 44 #include "platform/graphics/paint/CachedDisplayItem.h" |
| 45 #include "platform/graphics/paint/DisplayItemClient.h" | 45 #include "platform/graphics/paint/DisplayItemClient.h" |
| 46 #include "platform/graphics/paint/PaintController.h" | 46 #include "platform/graphics/paint/PaintController.h" |
| 47 #include "platform/heap/Handle.h" | 47 #include "platform/heap/Handle.h" |
| 48 #include "platform/transforms/TransformationMatrix.h" | 48 #include "platform/transforms/TransformationMatrix.h" |
| 49 #include "public/platform/WebContentLayer.h" | 49 #include "public/platform/WebContentLayer.h" |
| 50 #include "public/platform/WebImageLayer.h" | 50 #include "public/platform/WebImageLayer.h" |
| 51 #include "public/platform/WebLayerScrollClient.h" | 51 #include "public/platform/WebLayerScrollClient.h" |
| 52 #include "third_party/skia/include/core/SkFilterQuality.h" | 52 #include "third_party/skia/include/core/SkFilterQuality.h" |
| 53 #include "wtf/OwnPtr.h" | |
| 54 #include "wtf/PassOwnPtr.h" | |
| 55 #include "wtf/Vector.h" | 53 #include "wtf/Vector.h" |
| 54 #include <memory> |
| 56 | 55 |
| 57 namespace blink { | 56 namespace blink { |
| 58 | 57 |
| 59 class FloatRect; | 58 class FloatRect; |
| 60 class Image; | 59 class Image; |
| 61 class LinkHighlight; | 60 class LinkHighlight; |
| 62 class JSONObject; | 61 class JSONObject; |
| 63 class PaintController; | 62 class PaintController; |
| 64 class ScrollableArea; | 63 class ScrollableArea; |
| 65 class WebLayer; | 64 class WebLayer; |
| 66 | 65 |
| 67 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector; | 66 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector; |
| 68 | 67 |
| 69 // GraphicsLayer is an abstraction for a rendering surface with backing store, | 68 // GraphicsLayer is an abstraction for a rendering surface with backing store, |
| 70 // which may have associated transformation and animations. | 69 // which may have associated transformation and animations. |
| 71 | 70 |
| 72 class PLATFORM_EXPORT GraphicsLayer : public WebLayerScrollClient, public cc::La
yerClient, public DisplayItemClient { | 71 class PLATFORM_EXPORT GraphicsLayer : public WebLayerScrollClient, public cc::La
yerClient, public DisplayItemClient { |
| 73 WTF_MAKE_NONCOPYABLE(GraphicsLayer); USING_FAST_MALLOC(GraphicsLayer); | 72 WTF_MAKE_NONCOPYABLE(GraphicsLayer); USING_FAST_MALLOC(GraphicsLayer); |
| 74 public: | 73 public: |
| 75 static PassOwnPtr<GraphicsLayer> create(GraphicsLayerClient*); | 74 static std::unique_ptr<GraphicsLayer> create(GraphicsLayerClient*); |
| 76 | 75 |
| 77 ~GraphicsLayer() override; | 76 ~GraphicsLayer() override; |
| 78 | 77 |
| 79 GraphicsLayerClient* client() const { return m_client; } | 78 GraphicsLayerClient* client() const { return m_client; } |
| 80 | 79 |
| 81 GraphicsLayerDebugInfo& debugInfo(); | 80 GraphicsLayerDebugInfo& debugInfo(); |
| 82 | 81 |
| 83 void setCompositingReasons(CompositingReasons); | 82 void setCompositingReasons(CompositingReasons); |
| 84 CompositingReasons getCompositingReasons() const { return m_debugInfo.getCom
positingReasons(); } | 83 CompositingReasons getCompositingReasons() const { return m_debugInfo.getCom
positingReasons(); } |
| 85 void setSquashingDisallowedReasons(SquashingDisallowedReasons); | 84 void setSquashingDisallowedReasons(SquashingDisallowedReasons); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // A layer that replicates this layer. We only allow one, for now. | 351 // A layer that replicates this layer. We only allow one, for now. |
| 353 // The replica is not parented; this is the primary reference to it. | 352 // The replica is not parented; this is the primary reference to it. |
| 354 GraphicsLayer* m_replicaLayer; | 353 GraphicsLayer* m_replicaLayer; |
| 355 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the
original layer. | 354 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the
original layer. |
| 356 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o
f the replica. | 355 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o
f the replica. |
| 357 | 356 |
| 358 IntRect m_contentsRect; | 357 IntRect m_contentsRect; |
| 359 | 358 |
| 360 int m_paintCount; | 359 int m_paintCount; |
| 361 | 360 |
| 362 OwnPtr<WebContentLayer> m_layer; | 361 std::unique_ptr<WebContentLayer> m_layer; |
| 363 OwnPtr<WebImageLayer> m_imageLayer; | 362 std::unique_ptr<WebImageLayer> m_imageLayer; |
| 364 WebLayer* m_contentsLayer; | 363 WebLayer* m_contentsLayer; |
| 365 // We don't have ownership of m_contentsLayer, but we do want to know if a g
iven layer is the | 364 // We don't have ownership of m_contentsLayer, but we do want to know if a g
iven layer is the |
| 366 // same as our current layer in setContentsTo(). Since m_contentsLayer may b
e deleted at this point, | 365 // same as our current layer in setContentsTo(). Since m_contentsLayer may b
e deleted at this point, |
| 367 // we stash an ID away when we know m_contentsLayer is alive and use that fo
r comparisons from that point | 366 // we stash an ID away when we know m_contentsLayer is alive and use that fo
r comparisons from that point |
| 368 // on. | 367 // on. |
| 369 int m_contentsLayerId; | 368 int m_contentsLayerId; |
| 370 | 369 |
| 371 Vector<LinkHighlight*> m_linkHighlights; | 370 Vector<LinkHighlight*> m_linkHighlights; |
| 372 | 371 |
| 373 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; | 372 std::unique_ptr<ContentLayerDelegate> m_contentLayerDelegate; |
| 374 | 373 |
| 375 WeakPersistent<ScrollableArea> m_scrollableArea; | 374 WeakPersistent<ScrollableArea> m_scrollableArea; |
| 376 GraphicsLayerDebugInfo m_debugInfo; | 375 GraphicsLayerDebugInfo m_debugInfo; |
| 377 int m_3dRenderingContext; | 376 int m_3dRenderingContext; |
| 378 | 377 |
| 379 OwnPtr<PaintController> m_paintController; | 378 std::unique_ptr<PaintController> m_paintController; |
| 380 | 379 |
| 381 IntRect m_previousInterestRect; | 380 IntRect m_previousInterestRect; |
| 382 | 381 |
| 383 DISPLAY_ITEM_CACHE_STATUS_IMPLEMENTATION | 382 DISPLAY_ITEM_CACHE_STATUS_IMPLEMENTATION |
| 384 }; | 383 }; |
| 385 | 384 |
| 386 } // namespace blink | 385 } // namespace blink |
| 387 | 386 |
| 388 #ifndef NDEBUG | 387 #ifndef NDEBUG |
| 389 // Outside the blink namespace for ease of invocation from gdb. | 388 // Outside the blink namespace for ease of invocation from gdb. |
| 390 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 389 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
| 391 #endif | 390 #endif |
| 392 | 391 |
| 393 #endif // GraphicsLayer_h | 392 #endif // GraphicsLayer_h |
| OLD | NEW |