| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
| 8 | 8 |
| 9 #include "ContentLayerChromium.h" | 9 #include "ContentLayerChromium.h" |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void ContentLayerChromium::createTextureUpdaterIfNeeded() | 88 void ContentLayerChromium::createTextureUpdaterIfNeeded() |
| 89 { | 89 { |
| 90 if (m_textureUpdater) | 90 if (m_textureUpdater) |
| 91 return; | 91 return; |
| 92 if (layerTreeHost()->settings().acceleratePainting) | 92 if (layerTreeHost()->settings().acceleratePainting) |
| 93 m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create
(ContentLayerPainter::create(m_client)); | 93 m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create
(ContentLayerPainter::create(m_client)); |
| 94 else if (CCSettings::perTilePaintingEnabled()) | 94 else if (CCSettings::perTilePaintingEnabled()) |
| 95 m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(Cont
entLayerPainter::create(m_client)); | 95 m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(Cont
entLayerPainter::create(m_client)); |
| 96 else | 96 else |
| 97 m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerP
ainter::create(m_client)); | 97 m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerP
ainter::create(m_client)); |
| 98 m_textureUpdater->setOpaque(opaque()); | 98 m_textureUpdater->setOpaque(contentsOpaque()); |
| 99 | 99 |
| 100 GC3Denum textureFormat = layerTreeHost()->rendererCapabilities().bestTexture
Format; | 100 GC3Denum textureFormat = layerTreeHost()->rendererCapabilities().bestTexture
Format; |
| 101 setTextureFormat(textureFormat); | 101 setTextureFormat(textureFormat); |
| 102 setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat)); | 102 setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat)); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void ContentLayerChromium::setOpaque(bool opaque) | 105 void ContentLayerChromium::setContentsOpaque(bool opaque) |
| 106 { | 106 { |
| 107 LayerChromium::setOpaque(opaque); | 107 LayerChromium::setContentsOpaque(opaque); |
| 108 if (m_textureUpdater) | 108 if (m_textureUpdater) |
| 109 m_textureUpdater->setOpaque(opaque); | 109 m_textureUpdater->setOpaque(opaque); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } | 112 } |
| 113 #endif // USE(ACCELERATED_COMPOSITING) | 113 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |