Chromium Code Reviews| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 203 | 203 |
| 204 typedef HashMap<int, int> RenderingContextMap; | 204 typedef HashMap<int, int> RenderingContextMap; |
| 205 PassRefPtr<JSONObject> layerTreeAsJSON(LayerTreeFlags, RenderingContextMap&) const; | 205 PassRefPtr<JSONObject> layerTreeAsJSON(LayerTreeFlags, RenderingContextMap&) const; |
| 206 | 206 |
| 207 int paintCount() const { return m_paintCount; } | 207 int paintCount() const { return m_paintCount; } |
| 208 | 208 |
| 209 // Return a string with a human readable form of the layer tree, If debug is true | 209 // Return a string with a human readable form of the layer tree, If debug is true |
| 210 // pointers for the layers and timing data will be included in the returned string. | 210 // pointers for the layers and timing data will be included in the returned string. |
| 211 String layerTreeAsText(LayerTreeFlags = LayerTreeNormal) const; | 211 String layerTreeAsText(LayerTreeFlags = LayerTreeNormal) const; |
| 212 | 212 |
| 213 bool isTrackingPaintInvalidations() const { return m_client->isTrackingPaint Invalidations(); } | 213 void setTracksPaintInvalidations(bool); |
| 214 bool isTrackingOrCheckingPaintInvalidations() const | |
| 215 { | |
| 216 #if DCHECK_IS_ON() | |
| 217 if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnable d()) | |
| 218 return true; | |
| 219 #endif | |
| 220 return m_isTrackingPaintInvalidations; | |
| 221 } | |
| 222 | |
| 214 void resetTrackedPaintInvalidations(); | 223 void resetTrackedPaintInvalidations(); |
| 215 bool hasTrackedPaintInvalidations() const; | 224 bool hasTrackedPaintInvalidations() const; |
| 216 void trackPaintInvalidation(const DisplayItemClient&, const FloatRect&, Pain tInvalidationReason); | 225 void trackPaintInvalidation(const DisplayItemClient&, const IntRect&, PaintI nvalidationReason); |
| 217 | 226 |
| 218 void addLinkHighlight(LinkHighlight*); | 227 void addLinkHighlight(LinkHighlight*); |
| 219 void removeLinkHighlight(LinkHighlight*); | 228 void removeLinkHighlight(LinkHighlight*); |
| 220 // Exposed for tests | 229 // Exposed for tests |
| 221 unsigned numLinkHighlights() { return m_linkHighlights.size(); } | 230 unsigned numLinkHighlights() { return m_linkHighlights.size(); } |
| 222 LinkHighlight* getLinkHighlight(int i) { return m_linkHighlights[i]; } | 231 LinkHighlight* getLinkHighlight(int i) { return m_linkHighlights[i]; } |
| 223 | 232 |
| 224 void setScrollableArea(ScrollableArea*, bool isViewport); | 233 void setScrollableArea(ScrollableArea*, bool isViewport); |
| 225 ScrollableArea* getScrollableArea() const { return m_scrollableArea; } | 234 ScrollableArea* getScrollableArea() const { return m_scrollableArea; } |
| 226 | 235 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 // Helper functions used by settors to keep layer's the state consistent. | 294 // Helper functions used by settors to keep layer's the state consistent. |
| 286 void updateChildList(); | 295 void updateChildList(); |
| 287 void updateLayerIsDrawable(); | 296 void updateLayerIsDrawable(); |
| 288 void updateContentsRect(); | 297 void updateContentsRect(); |
| 289 | 298 |
| 290 void setContentsTo(WebLayer*); | 299 void setContentsTo(WebLayer*); |
| 291 void setupContentsLayer(WebLayer*); | 300 void setupContentsLayer(WebLayer*); |
| 292 void clearContentsLayerIfUnregistered(); | 301 void clearContentsLayerIfUnregistered(); |
| 293 WebLayer* contentsLayerIfRegistered(); | 302 WebLayer* contentsLayerIfRegistered(); |
| 294 | 303 |
| 304 #if DCHECK_IS_ON() | |
| 305 PassRefPtr<SkPicture> capturePicture(); | |
| 306 void checkUnderPaintInvalidations(const SkPicture&); | |
|
chrishtr
2016/06/10 18:47:02
checkPaintUnderInvalidations
Xianzhu
2016/06/10 18:52:14
Done locally. Will upload with updated TestExpecta
| |
| 307 #endif | |
| 308 | |
| 295 GraphicsLayerClient* m_client; | 309 GraphicsLayerClient* m_client; |
| 296 | 310 |
| 297 // Offset from the owning layoutObject | 311 // Offset from the owning layoutObject |
| 298 DoubleSize m_offsetFromLayoutObject; | 312 DoubleSize m_offsetFromLayoutObject; |
| 299 | 313 |
| 300 // Position is relative to the parent GraphicsLayer | 314 // Position is relative to the parent GraphicsLayer |
| 301 FloatPoint m_position; | 315 FloatPoint m_position; |
| 302 FloatSize m_size; | 316 FloatSize m_size; |
| 303 | 317 |
| 304 TransformationMatrix m_transform; | 318 TransformationMatrix m_transform; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 318 bool m_contentsVisible : 1; | 332 bool m_contentsVisible : 1; |
| 319 bool m_isRootForIsolatedGroup : 1; | 333 bool m_isRootForIsolatedGroup : 1; |
| 320 | 334 |
| 321 bool m_hasScrollParent : 1; | 335 bool m_hasScrollParent : 1; |
| 322 bool m_hasClipParent : 1; | 336 bool m_hasClipParent : 1; |
| 323 | 337 |
| 324 bool m_painted : 1; | 338 bool m_painted : 1; |
| 325 bool m_textPainted : 1; | 339 bool m_textPainted : 1; |
| 326 bool m_imagePainted : 1; | 340 bool m_imagePainted : 1; |
| 327 | 341 |
| 342 bool m_isTrackingPaintInvalidations : 1; | |
| 343 | |
| 328 GraphicsLayerPaintingPhase m_paintingPhase; | 344 GraphicsLayerPaintingPhase m_paintingPhase; |
| 329 | 345 |
| 330 Vector<GraphicsLayer*> m_children; | 346 Vector<GraphicsLayer*> m_children; |
| 331 GraphicsLayer* m_parent; | 347 GraphicsLayer* m_parent; |
| 332 | 348 |
| 333 GraphicsLayer* m_maskLayer; // Reference to mask layer. We don't own this. | 349 GraphicsLayer* m_maskLayer; // Reference to mask layer. We don't own this. |
| 334 GraphicsLayer* m_contentsClippingMaskLayer; // Reference to clipping mask la yer. We don't own this. | 350 GraphicsLayer* m_contentsClippingMaskLayer; // Reference to clipping mask la yer. We don't own this. |
| 335 | 351 |
| 336 // A layer that replicates this layer. We only allow one, for now. | 352 // A layer that replicates this layer. We only allow one, for now. |
| 337 // The replica is not parented; this is the primary reference to it. | 353 // The replica is not parented; this is the primary reference to it. |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 368 }; | 384 }; |
| 369 | 385 |
| 370 } // namespace blink | 386 } // namespace blink |
| 371 | 387 |
| 372 #ifndef NDEBUG | 388 #ifndef NDEBUG |
| 373 // Outside the blink namespace for ease of invocation from gdb. | 389 // Outside the blink namespace for ease of invocation from gdb. |
| 374 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 390 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
| 375 #endif | 391 #endif |
| 376 | 392 |
| 377 #endif // GraphicsLayer_h | 393 #endif // GraphicsLayer_h |
| OLD | NEW |