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 #include "ContentLayerChromium.h" | 7 #include "ContentLayerChromium.h" |
8 | 8 |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "BitmapCanvasLayerTextureUpdater.h" | 10 #include "BitmapCanvasLayerTextureUpdater.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 if (m_textureUpdater) | 88 if (m_textureUpdater) |
89 return; | 89 return; |
90 if (layerTreeHost()->settings().acceleratePainting) | 90 if (layerTreeHost()->settings().acceleratePainting) |
91 m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create
(ContentLayerPainter::create(m_client)); | 91 m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create
(ContentLayerPainter::create(m_client)); |
92 else if (CCSettings::perTilePaintingEnabled()) | 92 else if (CCSettings::perTilePaintingEnabled()) |
93 m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(Cont
entLayerPainter::create(m_client)); | 93 m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(Cont
entLayerPainter::create(m_client)); |
94 else | 94 else |
95 m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerP
ainter::create(m_client)); | 95 m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerP
ainter::create(m_client)); |
96 m_textureUpdater->setOpaque(contentsOpaque()); | 96 m_textureUpdater->setOpaque(contentsOpaque()); |
97 | 97 |
98 GC3Denum textureFormat = layerTreeHost()->rendererCapabilities().bestTexture
Format; | 98 GLenum textureFormat = layerTreeHost()->rendererCapabilities().bestTextureFo
rmat; |
99 setTextureFormat(textureFormat); | 99 setTextureFormat(textureFormat); |
100 setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat)); | 100 setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat)); |
101 } | 101 } |
102 | 102 |
103 void ContentLayerChromium::setContentsOpaque(bool opaque) | 103 void ContentLayerChromium::setContentsOpaque(bool opaque) |
104 { | 104 { |
105 LayerChromium::setContentsOpaque(opaque); | 105 LayerChromium::setContentsOpaque(opaque); |
106 if (m_textureUpdater) | 106 if (m_textureUpdater) |
107 m_textureUpdater->setOpaque(opaque); | 107 m_textureUpdater->setOpaque(opaque); |
108 } | 108 } |
109 | 109 |
110 } | 110 } |
OLD | NEW |