| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 , m_backgroundColor(Color::transparent) | 83 , m_backgroundColor(Color::transparent) |
| 84 , m_opacity(1) | 84 , m_opacity(1) |
| 85 , m_blendMode(WebBlendModeNormal) | 85 , m_blendMode(WebBlendModeNormal) |
| 86 , m_hasTransformOrigin(false) | 86 , m_hasTransformOrigin(false) |
| 87 , m_contentsOpaque(false) | 87 , m_contentsOpaque(false) |
| 88 , m_shouldFlattenTransform(true) | 88 , m_shouldFlattenTransform(true) |
| 89 , m_backfaceVisibility(true) | 89 , m_backfaceVisibility(true) |
| 90 , m_masksToBounds(false) | 90 , m_masksToBounds(false) |
| 91 , m_drawsContent(false) | 91 , m_drawsContent(false) |
| 92 , m_contentsVisible(true) | 92 , m_contentsVisible(true) |
| 93 , m_isRootForIsolatedGroup(false) | |
| 94 , m_hasScrollParent(false) | 93 , m_hasScrollParent(false) |
| 95 , m_hasClipParent(false) | 94 , m_hasClipParent(false) |
| 96 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) | 95 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) |
| 97 , m_parent(0) | 96 , m_parent(0) |
| 98 , m_maskLayer(0) | 97 , m_maskLayer(0) |
| 99 , m_contentsClippingMaskLayer(0) | 98 , m_contentsClippingMaskLayer(0) |
| 100 , m_paintCount(0) | 99 , m_paintCount(0) |
| 101 , m_contentsLayer(0) | 100 , m_contentsLayer(0) |
| 102 , m_contentsLayerId(0) | 101 , m_contentsLayerId(0) |
| 103 , m_scrollableArea(0) | 102 , m_scrollableArea(0) |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 | 533 |
| 535 if (m_size != IntSize()) | 534 if (m_size != IntSize()) |
| 536 json->setArray("bounds", sizeAsJSONArray(m_size)); | 535 json->setArray("bounds", sizeAsJSONArray(m_size)); |
| 537 | 536 |
| 538 if (m_opacity != 1) | 537 if (m_opacity != 1) |
| 539 json->setNumber("opacity", m_opacity); | 538 json->setNumber("opacity", m_opacity); |
| 540 | 539 |
| 541 if (m_blendMode != WebBlendModeNormal) | 540 if (m_blendMode != WebBlendModeNormal) |
| 542 json->setString("blendMode", compositeOperatorName(CompositeSourceOver,
m_blendMode)); | 541 json->setString("blendMode", compositeOperatorName(CompositeSourceOver,
m_blendMode)); |
| 543 | 542 |
| 544 if (m_isRootForIsolatedGroup) | |
| 545 json->setBoolean("isolate", m_isRootForIsolatedGroup); | |
| 546 | |
| 547 if (m_contentsOpaque) | 543 if (m_contentsOpaque) |
| 548 json->setBoolean("contentsOpaque", m_contentsOpaque); | 544 json->setBoolean("contentsOpaque", m_contentsOpaque); |
| 549 | 545 |
| 550 if (!m_shouldFlattenTransform) | 546 if (!m_shouldFlattenTransform) |
| 551 json->setBoolean("shouldFlattenTransform", m_shouldFlattenTransform); | 547 json->setBoolean("shouldFlattenTransform", m_shouldFlattenTransform); |
| 552 | 548 |
| 553 if (m_3dRenderingContext) { | 549 if (m_3dRenderingContext) { |
| 554 RenderingContextMap::const_iterator it = renderingContextMap.find(m_3dRe
nderingContext); | 550 RenderingContextMap::const_iterator it = renderingContextMap.find(m_3dRe
nderingContext); |
| 555 int contextId = renderingContextMap.size() + 1; | 551 int contextId = renderingContextMap.size() + 1; |
| 556 if (it == renderingContextMap.end()) | 552 if (it == renderingContextMap.end()) |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 } | 827 } |
| 832 | 828 |
| 833 void GraphicsLayer::setBlendMode(WebBlendMode blendMode) | 829 void GraphicsLayer::setBlendMode(WebBlendMode blendMode) |
| 834 { | 830 { |
| 835 if (m_blendMode == blendMode) | 831 if (m_blendMode == blendMode) |
| 836 return; | 832 return; |
| 837 m_blendMode = blendMode; | 833 m_blendMode = blendMode; |
| 838 platformLayer()->setBlendMode(WebBlendMode(blendMode)); | 834 platformLayer()->setBlendMode(WebBlendMode(blendMode)); |
| 839 } | 835 } |
| 840 | 836 |
| 841 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) | |
| 842 { | |
| 843 if (m_isRootForIsolatedGroup == isolated) | |
| 844 return; | |
| 845 m_isRootForIsolatedGroup = isolated; | |
| 846 platformLayer()->setIsRootForIsolatedGroup(isolated); | |
| 847 } | |
| 848 | |
| 849 void GraphicsLayer::setContentsNeedsDisplay() | 837 void GraphicsLayer::setContentsNeedsDisplay() |
| 850 { | 838 { |
| 851 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { | 839 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { |
| 852 contentsLayer->invalidate(); | 840 contentsLayer->invalidate(); |
| 853 addRepaintRect(m_contentsRect); | 841 addRepaintRect(m_contentsRect); |
| 854 } | 842 } |
| 855 } | 843 } |
| 856 | 844 |
| 857 void GraphicsLayer::setNeedsDisplay() | 845 void GraphicsLayer::setNeedsDisplay() |
| 858 { | 846 { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 #ifndef NDEBUG | 992 #ifndef NDEBUG |
| 1005 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 993 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
| 1006 { | 994 { |
| 1007 if (!layer) | 995 if (!layer) |
| 1008 return; | 996 return; |
| 1009 | 997 |
| 1010 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 998 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1011 fprintf(stderr, "%s\n", output.utf8().data()); | 999 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1012 } | 1000 } |
| 1013 #endif | 1001 #endif |
| OLD | NEW |