OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. 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 are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 , m_contentsLayerHasBackgroundColor(false) | 95 , m_contentsLayerHasBackgroundColor(false) |
96 , m_inSetChildren(false) | 96 , m_inSetChildren(false) |
97 { | 97 { |
98 m_layer = ContentLayerChromium::create(this); | 98 m_layer = ContentLayerChromium::create(this); |
99 | 99 |
100 updateDebugIndicators(); | 100 updateDebugIndicators(); |
101 } | 101 } |
102 | 102 |
103 GraphicsLayerChromium::~GraphicsLayerChromium() | 103 GraphicsLayerChromium::~GraphicsLayerChromium() |
104 { | 104 { |
105 if (m_layer) | 105 if (m_layer) { |
106 m_layer->setOwner(0); | 106 m_layer->setOwner(0); |
107 if (m_contentsLayer) | 107 if (m_layer->ccLayerImpl()) |
| 108 m_layer->ccLayerImpl()->clearRenderSurface(); |
| 109 } |
| 110 if (m_contentsLayer) { |
108 m_contentsLayer->setOwner(0); | 111 m_contentsLayer->setOwner(0); |
109 if (m_transformLayer) | 112 if (m_contentsLayer->ccLayerImpl()) |
| 113 m_contentsLayer->ccLayerImpl()->clearRenderSurface(); |
| 114 } |
| 115 if (m_transformLayer) { |
110 m_transformLayer->setOwner(0); | 116 m_transformLayer->setOwner(0); |
| 117 if (m_transformLayer->ccLayerImpl()) |
| 118 m_transformLayer->ccLayerImpl()->clearRenderSurface(); |
| 119 } |
111 } | 120 } |
112 | 121 |
113 void GraphicsLayerChromium::setName(const String& inName) | 122 void GraphicsLayerChromium::setName(const String& inName) |
114 { | 123 { |
115 m_nameBase = inName; | 124 m_nameBase = inName; |
116 String name = String::format("GraphicsLayerChromium(%p) GraphicsLayer(%p) ",
m_layer.get(), this) + inName; | 125 String name = String::format("GraphicsLayerChromium(%p) GraphicsLayer(%p) ",
m_layer.get(), this) + inName; |
117 GraphicsLayer::setName(name); | 126 GraphicsLayer::setName(name); |
118 updateNames(); | 127 updateNames(); |
119 } | 128 } |
120 | 129 |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 | 686 |
678 // This function simply mimics the operation of GraphicsLayerCA | 687 // This function simply mimics the operation of GraphicsLayerCA |
679 void GraphicsLayerChromium::updateOpacityOnLayer() | 688 void GraphicsLayerChromium::updateOpacityOnLayer() |
680 { | 689 { |
681 primaryLayer()->setOpacity(m_opacity); | 690 primaryLayer()->setOpacity(m_opacity); |
682 } | 691 } |
683 | 692 |
684 } // namespace WebCore | 693 } // namespace WebCore |
685 | 694 |
686 #endif // USE(ACCELERATED_COMPOSITING) | 695 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |