| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 if (!m_textures[i].m_texture) { | 141 if (!m_textures[i].m_texture) { |
| 142 videoLayer->setSkipsDraw(true); | 142 videoLayer->setSkipsDraw(true); |
| 143 break; | 143 break; |
| 144 } | 144 } |
| 145 videoLayer->setTexture(i, m_textures[i].m_texture->textureId(), m_textur
es[i].m_texture->size(), m_textures[i].m_visibleSize); | 145 videoLayer->setTexture(i, m_textures[i].m_texture->textureId(), m_textur
es[i].m_texture->size(), m_textures[i].m_visibleSize); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 void VideoLayerChromium::setLayerTreeHost(CCLayerTreeHost* host) | 149 void VideoLayerChromium::setLayerTreeHost(CCLayerTreeHost* host) |
| 150 { | 150 { |
| 151 if (layerTreeHost() != host) { | 151 if (host && layerTreeHost() != host) { |
| 152 for (size_t i = 0; i < 3; ++i) { | 152 for (size_t i = 0; i < 3; ++i) { |
| 153 m_textures[i].m_visibleSize = IntSize(); | 153 m_textures[i].m_visibleSize = IntSize(); |
| 154 m_textures[i].m_texture = ManagedTexture::create(host->contentsTextu
reManager()); | 154 m_textures[i].m_texture = ManagedTexture::create(host->contentsTextu
reManager()); |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 | 157 |
| 158 LayerChromium::setLayerTreeHost(host); | 158 LayerChromium::setLayerTreeHost(host); |
| 159 } | 159 } |
| 160 | 160 |
| 161 GC3Denum VideoLayerChromium::determineTextureFormat(const VideoFrameChromium* fr
ame) | 161 GC3Denum VideoLayerChromium::determineTextureFormat(const VideoFrameChromium* fr
ame) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 if (!m_currentFrame) | 251 if (!m_currentFrame) |
| 252 return; | 252 return; |
| 253 | 253 |
| 254 m_provider->putCurrentFrame(m_currentFrame); | 254 m_provider->putCurrentFrame(m_currentFrame); |
| 255 m_currentFrame = 0; | 255 m_currentFrame = 0; |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace WebCore | 258 } // namespace WebCore |
| 259 | 259 |
| 260 #endif // USE(ACCELERATED_COMPOSITING) | 260 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |