OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 ContentLayerChromium::ContentLayerChromium(GraphicsLayerChromium* owner) | 78 ContentLayerChromium::ContentLayerChromium(GraphicsLayerChromium* owner) |
79 : TiledLayerChromium(owner) | 79 : TiledLayerChromium(owner) |
80 { | 80 { |
81 } | 81 } |
82 | 82 |
83 ContentLayerChromium::~ContentLayerChromium() | 83 ContentLayerChromium::~ContentLayerChromium() |
84 { | 84 { |
85 cleanupResources(); | 85 cleanupResources(); |
86 } | 86 } |
87 | 87 |
| 88 void ContentLayerChromium::cleanupResources() |
| 89 { |
| 90 m_textureUpdater.clear(); |
| 91 TiledLayerChromium::cleanupResources(); |
| 92 } |
| 93 |
88 void ContentLayerChromium::paintContentsIfDirty() | 94 void ContentLayerChromium::paintContentsIfDirty() |
89 { | 95 { |
90 ASSERT(drawsContent()); | 96 ASSERT(drawsContent()); |
91 ASSERT(layerRenderer()); | 97 ASSERT(layerRenderer()); |
92 | 98 |
93 updateTileSizeAndTilingOption(); | 99 updateTileSizeAndTilingOption(); |
94 | 100 |
95 const IntRect& layerRect = visibleLayerRect(); | 101 const IntRect& layerRect = visibleLayerRect(); |
96 if (layerRect.isEmpty()) | 102 if (layerRect.isEmpty()) |
97 return; | 103 return; |
(...skipping 22 matching lines...) Expand all Loading... |
120 if (layerRenderer()->accelerateDrawing()) { | 126 if (layerRenderer()->accelerateDrawing()) { |
121 m_textureUpdater = LayerTextureUpdaterSkPicture::create(layerRendererCon
text(), ContentLayerPainter::create(m_owner), layerRenderer()->skiaContext()); | 127 m_textureUpdater = LayerTextureUpdaterSkPicture::create(layerRendererCon
text(), ContentLayerPainter::create(m_owner), layerRenderer()->skiaContext()); |
122 return; | 128 return; |
123 } | 129 } |
124 #endif | 130 #endif |
125 m_textureUpdater = LayerTextureUpdaterBitmap::create(layerRendererContext(),
ContentLayerPainter::create(m_owner), layerRenderer()->contextSupportsMapSub())
; | 131 m_textureUpdater = LayerTextureUpdaterBitmap::create(layerRendererContext(),
ContentLayerPainter::create(m_owner), layerRenderer()->contextSupportsMapSub())
; |
126 } | 132 } |
127 | 133 |
128 } | 134 } |
129 #endif // USE(ACCELERATED_COMPOSITING) | 135 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |