| 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/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 "platform/wtf/Vector.h" | 49 #include "platform/wtf/Vector.h" |
| 50 #include "public/platform/WebContentLayer.h" | 50 #include "public/platform/WebContentLayer.h" |
| 51 #include "public/platform/WebImageLayer.h" | 51 #include "public/platform/WebImageLayer.h" |
| 52 #include "public/platform/WebLayerStickyPositionConstraint.h" | 52 #include "public/platform/WebLayerStickyPositionConstraint.h" |
| 53 #include "public/platform/WebSnapPointList.h" |
| 53 #include "third_party/skia/include/core/SkFilterQuality.h" | 54 #include "third_party/skia/include/core/SkFilterQuality.h" |
| 54 #include "third_party/skia/include/core/SkRefCnt.h" | 55 #include "third_party/skia/include/core/SkRefCnt.h" |
| 55 | 56 |
| 56 namespace blink { | 57 namespace blink { |
| 57 | 58 |
| 58 class CompositorFilterOperations; | 59 class CompositorFilterOperations; |
| 59 class Image; | 60 class Image; |
| 60 class JSONObject; | 61 class JSONObject; |
| 61 class LinkHighlight; | 62 class LinkHighlight; |
| 62 class PaintController; | 63 class PaintController; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 ContentLayerDelegate* ContentLayerDelegateForTesting() const { | 271 ContentLayerDelegate* ContentLayerDelegateForTesting() const { |
| 271 return content_layer_delegate_.get(); | 272 return content_layer_delegate_.get(); |
| 272 } | 273 } |
| 273 | 274 |
| 274 // DisplayItemClient methods | 275 // DisplayItemClient methods |
| 275 String DebugName() const final { return client_->DebugName(this); } | 276 String DebugName() const final { return client_->DebugName(this); } |
| 276 LayoutRect VisualRect() const override; | 277 LayoutRect VisualRect() const override; |
| 277 | 278 |
| 278 void SetHasWillChangeTransformHint(bool); | 279 void SetHasWillChangeTransformHint(bool); |
| 279 | 280 |
| 281 void SetSnapOffsets(const WebSnapPointList&); |
| 282 |
| 280 protected: | 283 protected: |
| 281 String DebugName(cc::Layer*) const; | 284 String DebugName(cc::Layer*) const; |
| 282 bool ShouldFlattenTransform() const { return should_flatten_transform_; } | 285 bool ShouldFlattenTransform() const { return should_flatten_transform_; } |
| 283 | 286 |
| 284 explicit GraphicsLayer(GraphicsLayerClient*); | 287 explicit GraphicsLayer(GraphicsLayerClient*); |
| 285 // for testing | 288 // for testing |
| 286 friend class CompositedLayerMappingTest; | 289 friend class CompositedLayerMappingTest; |
| 287 friend class PaintControllerPaintTestBase; | 290 friend class PaintControllerPaintTestBase; |
| 288 | 291 |
| 289 private: | 292 private: |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 WebLayer* contents_layer_; | 379 WebLayer* contents_layer_; |
| 377 // We don't have ownership of m_contentsLayer, but we do want to know if a | 380 // We don't have ownership of m_contentsLayer, but we do want to know if a |
| 378 // given layer is the same as our current layer in setContentsTo(). Since | 381 // given layer is the same as our current layer in setContentsTo(). Since |
| 379 // |m_contentsLayer| may be deleted at this point, we stash an ID away when we | 382 // |m_contentsLayer| may be deleted at this point, we stash an ID away when we |
| 380 // know |m_contentsLayer| is alive and use that for comparisons from that | 383 // know |m_contentsLayer| is alive and use that for comparisons from that |
| 381 // point on. | 384 // point on. |
| 382 int contents_layer_id_; | 385 int contents_layer_id_; |
| 383 | 386 |
| 384 Vector<LinkHighlight*> link_highlights_; | 387 Vector<LinkHighlight*> link_highlights_; |
| 385 | 388 |
| 389 Vector<double> m_snapOffsetsH; |
| 390 Vector<double> m_snapOffsetsV; |
| 391 |
| 386 std::unique_ptr<ContentLayerDelegate> content_layer_delegate_; | 392 std::unique_ptr<ContentLayerDelegate> content_layer_delegate_; |
| 387 | 393 |
| 388 WeakPersistent<ScrollableArea> scrollable_area_; | 394 WeakPersistent<ScrollableArea> scrollable_area_; |
| 389 GraphicsLayerDebugInfo debug_info_; | 395 GraphicsLayerDebugInfo debug_info_; |
| 390 int rendering_context3d_; | 396 int rendering_context3d_; |
| 391 | 397 |
| 392 std::unique_ptr<PaintController> paint_controller_; | 398 std::unique_ptr<PaintController> paint_controller_; |
| 393 | 399 |
| 394 IntRect previous_interest_rect_; | 400 IntRect previous_interest_rect_; |
| 395 }; | 401 }; |
| 396 | 402 |
| 397 } // namespace blink | 403 } // namespace blink |
| 398 | 404 |
| 399 #ifndef NDEBUG | 405 #ifndef NDEBUG |
| 400 // Outside the blink namespace for ease of invocation from gdb. | 406 // Outside the blink namespace for ease of invocation from gdb. |
| 401 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 407 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
| 402 void PLATFORM_EXPORT showGraphicsLayers(const blink::GraphicsLayer*); | 408 void PLATFORM_EXPORT showGraphicsLayers(const blink::GraphicsLayer*); |
| 403 #endif | 409 #endif |
| 404 | 410 |
| 405 #endif // GraphicsLayer_h | 411 #endif // GraphicsLayer_h |
| OLD | NEW |