| 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 30 matching lines...) Expand all Loading... |
| 41 #include "platform/graphics/GraphicsLayerClient.h" | 41 #include "platform/graphics/GraphicsLayerClient.h" |
| 42 #include "platform/graphics/GraphicsLayerDebugInfo.h" | 42 #include "platform/graphics/GraphicsLayerDebugInfo.h" |
| 43 #include "platform/graphics/ImageOrientation.h" | 43 #include "platform/graphics/ImageOrientation.h" |
| 44 #include "platform/graphics/PaintInvalidationReason.h" | 44 #include "platform/graphics/PaintInvalidationReason.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" | |
| 52 #include "public/platform/WebLayerStickyPositionConstraint.h" | 51 #include "public/platform/WebLayerStickyPositionConstraint.h" |
| 53 #include "third_party/skia/include/core/SkFilterQuality.h" | 52 #include "third_party/skia/include/core/SkFilterQuality.h" |
| 54 #include "third_party/skia/include/core/SkRefCnt.h" | 53 #include "third_party/skia/include/core/SkRefCnt.h" |
| 55 #include "wtf/Vector.h" | 54 #include "wtf/Vector.h" |
| 56 #include <memory> | 55 #include <memory> |
| 57 | 56 |
| 58 namespace blink { | 57 namespace blink { |
| 59 | 58 |
| 60 class CompositorFilterOperations; | 59 class CompositorFilterOperations; |
| 61 class Image; | 60 class Image; |
| 62 class JSONObject; | 61 class JSONObject; |
| 63 class LinkHighlight; | 62 class LinkHighlight; |
| 64 class PaintController; | 63 class PaintController; |
| 65 struct RasterInvalidationTracking; | 64 struct RasterInvalidationTracking; |
| 66 class ScrollableArea; | 65 class ScrollableArea; |
| 67 class WebLayer; | 66 class WebLayer; |
| 68 | 67 |
| 69 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector; | 68 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector; |
| 70 | 69 |
| 71 // GraphicsLayer is an abstraction for a rendering surface with backing store, | 70 // GraphicsLayer is an abstraction for a rendering surface with backing store, |
| 72 // which may have associated transformation and animations. | 71 // which may have associated transformation and animations. |
| 73 | 72 class PLATFORM_EXPORT GraphicsLayer : public cc::LayerClient, |
| 74 class PLATFORM_EXPORT GraphicsLayer : public WebLayerScrollClient, | |
| 75 public cc::LayerClient, | |
| 76 public DisplayItemClient { | 73 public DisplayItemClient { |
| 77 WTF_MAKE_NONCOPYABLE(GraphicsLayer); | 74 WTF_MAKE_NONCOPYABLE(GraphicsLayer); |
| 78 USING_FAST_MALLOC(GraphicsLayer); | 75 USING_FAST_MALLOC(GraphicsLayer); |
| 79 | 76 |
| 80 public: | 77 public: |
| 81 static std::unique_ptr<GraphicsLayer> create(GraphicsLayerClient*); | 78 static std::unique_ptr<GraphicsLayer> create(GraphicsLayerClient*); |
| 82 | 79 |
| 83 ~GraphicsLayer() override; | 80 ~GraphicsLayer() override; |
| 84 | 81 |
| 85 GraphicsLayerClient* client() const { return m_client; } | 82 GraphicsLayerClient* client() const { return m_client; } |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 | 244 |
| 248 WebContentLayer* contentLayer() const { return m_layer.get(); } | 245 WebContentLayer* contentLayer() const { return m_layer.get(); } |
| 249 | 246 |
| 250 static void registerContentsLayer(WebLayer*); | 247 static void registerContentsLayer(WebLayer*); |
| 251 static void unregisterContentsLayer(WebLayer*); | 248 static void unregisterContentsLayer(WebLayer*); |
| 252 | 249 |
| 253 IntRect interestRect(); | 250 IntRect interestRect(); |
| 254 void paint(const IntRect* interestRect, | 251 void paint(const IntRect* interestRect, |
| 255 GraphicsContext::DisabledMode = GraphicsContext::NothingDisabled); | 252 GraphicsContext::DisabledMode = GraphicsContext::NothingDisabled); |
| 256 | 253 |
| 257 // WebLayerScrollClient implementation. | |
| 258 void didScroll() override; | |
| 259 | |
| 260 // cc::LayerClient implementation. | 254 // cc::LayerClient implementation. |
| 261 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo( | 255 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo( |
| 262 cc::Layer*) override; | 256 cc::Layer*) override; |
| 263 void didUpdateMainThreadScrollingReasons() override; | 257 void didUpdateMainThreadScrollingReasons() override; |
| 264 void didChangeScrollbarsHidden(bool); | 258 void didChangeScrollbarsHidden(bool); |
| 265 | 259 |
| 266 PaintController& getPaintController(); | 260 PaintController& getPaintController(); |
| 267 | 261 |
| 268 // Exposed for tests. | 262 // Exposed for tests. |
| 269 WebLayer* contentsLayer() const { return m_contentsLayer; } | 263 WebLayer* contentsLayer() const { return m_contentsLayer; } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 }; | 405 }; |
| 412 | 406 |
| 413 } // namespace blink | 407 } // namespace blink |
| 414 | 408 |
| 415 #ifndef NDEBUG | 409 #ifndef NDEBUG |
| 416 // Outside the blink namespace for ease of invocation from gdb. | 410 // Outside the blink namespace for ease of invocation from gdb. |
| 417 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 411 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
| 418 #endif | 412 #endif |
| 419 | 413 |
| 420 #endif // GraphicsLayer_h | 414 #endif // GraphicsLayer_h |
| OLD | NEW |