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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 , m_contentsLayer(0) | 105 , m_contentsLayer(0) |
106 , m_contentsLayerId(0) | 106 , m_contentsLayerId(0) |
107 , m_scrollableArea(0) | 107 , m_scrollableArea(0) |
108 , m_3dRenderingContext(0) | 108 , m_3dRenderingContext(0) |
109 { | 109 { |
110 #if ENABLE(ASSERT) | 110 #if ENABLE(ASSERT) |
111 if (m_client) | 111 if (m_client) |
112 m_client->verifyNotPainting(); | 112 m_client->verifyNotPainting(); |
113 #endif | 113 #endif |
114 | 114 |
115 m_opaqueRectTrackingContentLayerDelegate = adoptPtr(new OpaqueRectTrackingCo
ntentLayerDelegate(this)); | 115 m_contentLayerDelegate = adoptPtr(new ContentLayerDelegate(this)); |
116 m_layer = adoptPtr(Platform::current()->compositorSupport()->createContentLa
yer(m_opaqueRectTrackingContentLayerDelegate.get())); | 116 m_layer = adoptPtr(Platform::current()->compositorSupport()->createContentLa
yer(m_contentLayerDelegate.get())); |
117 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); | 117 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); |
118 m_layer->layer()->setWebLayerClient(this); | 118 m_layer->layer()->setWebLayerClient(this); |
119 m_layer->setAutomaticallyComputeRasterScale(true); | 119 m_layer->setAutomaticallyComputeRasterScale(true); |
120 } | 120 } |
121 | 121 |
122 GraphicsLayer::~GraphicsLayer() | 122 GraphicsLayer::~GraphicsLayer() |
123 { | 123 { |
124 for (size_t i = 0; i < m_linkHighlights.size(); ++i) | 124 for (size_t i = 0; i < m_linkHighlights.size(); ++i) |
125 m_linkHighlights[i]->clearCurrentGraphicsLayer(); | 125 m_linkHighlights[i]->clearCurrentGraphicsLayer(); |
126 m_linkHighlights.clear(); | 126 m_linkHighlights.clear(); |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 return; | 817 return; |
818 | 818 |
819 m_backgroundColor = color; | 819 m_backgroundColor = color; |
820 m_layer->layer()->setBackgroundColor(m_backgroundColor.rgb()); | 820 m_layer->layer()->setBackgroundColor(m_backgroundColor.rgb()); |
821 } | 821 } |
822 | 822 |
823 void GraphicsLayer::setContentsOpaque(bool opaque) | 823 void GraphicsLayer::setContentsOpaque(bool opaque) |
824 { | 824 { |
825 m_contentsOpaque = opaque; | 825 m_contentsOpaque = opaque; |
826 m_layer->layer()->setOpaque(m_contentsOpaque); | 826 m_layer->layer()->setOpaque(m_contentsOpaque); |
827 m_opaqueRectTrackingContentLayerDelegate->setOpaque(m_contentsOpaque); | 827 m_contentLayerDelegate->setOpaque(m_contentsOpaque); |
828 clearContentsLayerIfUnregistered(); | 828 clearContentsLayerIfUnregistered(); |
829 if (m_contentsLayer) | 829 if (m_contentsLayer) |
830 m_contentsLayer->setOpaque(opaque); | 830 m_contentsLayer->setOpaque(opaque); |
831 } | 831 } |
832 | 832 |
833 void GraphicsLayer::setMaskLayer(GraphicsLayer* maskLayer) | 833 void GraphicsLayer::setMaskLayer(GraphicsLayer* maskLayer) |
834 { | 834 { |
835 if (maskLayer == m_maskLayer) | 835 if (maskLayer == m_maskLayer) |
836 return; | 836 return; |
837 | 837 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 #ifndef NDEBUG | 1062 #ifndef NDEBUG |
1063 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1063 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
1064 { | 1064 { |
1065 if (!layer) | 1065 if (!layer) |
1066 return; | 1066 return; |
1067 | 1067 |
1068 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1068 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1069 fprintf(stderr, "%s\n", output.utf8().data()); | 1069 fprintf(stderr, "%s\n", output.utf8().data()); |
1070 } | 1070 } |
1071 #endif | 1071 #endif |
OLD | NEW |