| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 // Return a string with a human readable form of the layer tree, If debug is
true | 202 // Return a string with a human readable form of the layer tree, If debug is
true |
| 203 // pointers for the layers and timing data will be included in the returned
string. | 203 // pointers for the layers and timing data will be included in the returned
string. |
| 204 String layerTreeAsText(LayerTreeFlags = LayerTreeNormal) const; | 204 String layerTreeAsText(LayerTreeFlags = LayerTreeNormal) const; |
| 205 | 205 |
| 206 std::unique_ptr<JSONObject> layerTreeAsJSON(LayerTreeFlags) const; | 206 std::unique_ptr<JSONObject> layerTreeAsJSON(LayerTreeFlags) const; |
| 207 | 207 |
| 208 void setTracksPaintInvalidations(bool); | 208 void setTracksPaintInvalidations(bool); |
| 209 bool isTrackingOrCheckingPaintInvalidations() const | 209 bool isTrackingOrCheckingPaintInvalidations() const |
| 210 { | 210 { |
| 211 return RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled() |
| m_isTrackingPaintInvalidations; | 211 #if DCHECK_IS_ON() |
| 212 if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnable
d()) |
| 213 return true; |
| 214 #endif |
| 215 return m_isTrackingPaintInvalidations; |
| 212 } | 216 } |
| 213 | 217 |
| 214 void resetTrackedPaintInvalidations(); | 218 void resetTrackedPaintInvalidations(); |
| 215 bool hasTrackedPaintInvalidations() const; | 219 bool hasTrackedPaintInvalidations() const; |
| 216 void trackPaintInvalidation(const DisplayItemClient&, const IntRect&, PaintI
nvalidationReason); | 220 void trackPaintInvalidation(const DisplayItemClient&, const IntRect&, PaintI
nvalidationReason); |
| 217 | 221 |
| 218 void addLinkHighlight(LinkHighlight*); | 222 void addLinkHighlight(LinkHighlight*); |
| 219 void removeLinkHighlight(LinkHighlight*); | 223 void removeLinkHighlight(LinkHighlight*); |
| 220 // Exposed for tests | 224 // Exposed for tests |
| 221 unsigned numLinkHighlights() { return m_linkHighlights.size(); } | 225 unsigned numLinkHighlights() { return m_linkHighlights.size(); } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 void updateContentsRect(); | 292 void updateContentsRect(); |
| 289 | 293 |
| 290 void setContentsTo(WebLayer*); | 294 void setContentsTo(WebLayer*); |
| 291 void setupContentsLayer(WebLayer*); | 295 void setupContentsLayer(WebLayer*); |
| 292 void clearContentsLayerIfUnregistered(); | 296 void clearContentsLayerIfUnregistered(); |
| 293 WebLayer* contentsLayerIfRegistered(); | 297 WebLayer* contentsLayerIfRegistered(); |
| 294 | 298 |
| 295 typedef HashMap<int, int> RenderingContextMap; | 299 typedef HashMap<int, int> RenderingContextMap; |
| 296 std::unique_ptr<JSONObject> layerTreeAsJSONInternal(LayerTreeFlags, Renderin
gContextMap&) const; | 300 std::unique_ptr<JSONObject> layerTreeAsJSONInternal(LayerTreeFlags, Renderin
gContextMap&) const; |
| 297 | 301 |
| 302 #if DCHECK_IS_ON() |
| 298 sk_sp<SkPicture> capturePicture(); | 303 sk_sp<SkPicture> capturePicture(); |
| 299 void checkPaintUnderInvalidations(const SkPicture&); | 304 void checkPaintUnderInvalidations(const SkPicture&); |
| 305 #endif |
| 300 | 306 |
| 301 GraphicsLayerClient* m_client; | 307 GraphicsLayerClient* m_client; |
| 302 | 308 |
| 303 // Offset from the owning layoutObject | 309 // Offset from the owning layoutObject |
| 304 DoubleSize m_offsetFromLayoutObject; | 310 DoubleSize m_offsetFromLayoutObject; |
| 305 | 311 |
| 306 // Position is relative to the parent GraphicsLayer | 312 // Position is relative to the parent GraphicsLayer |
| 307 FloatPoint m_position; | 313 FloatPoint m_position; |
| 308 FloatSize m_size; | 314 FloatSize m_size; |
| 309 | 315 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 }; | 378 }; |
| 373 | 379 |
| 374 } // namespace blink | 380 } // namespace blink |
| 375 | 381 |
| 376 #ifndef NDEBUG | 382 #ifndef NDEBUG |
| 377 // Outside the blink namespace for ease of invocation from gdb. | 383 // Outside the blink namespace for ease of invocation from gdb. |
| 378 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 384 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
| 379 #endif | 385 #endif |
| 380 | 386 |
| 381 #endif // GraphicsLayer_h | 387 #endif // GraphicsLayer_h |
| OLD | NEW |