Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Side by Side Diff: cc/content_layer.cc

Issue 11186039: Move CC switches to cc/switches.h. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Switch ui/compositor back to using compositorSupport() Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/gl_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "cc/content_layer.h" 7 #include "cc/content_layer.h"
8 8
9 #include "CCLayerTreeHost.h" 9 #include "CCLayerTreeHost.h"
10 #include "CCSettings.h" 10 #include "CCSettings.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return m_textureUpdater.get(); 83 return m_textureUpdater.get();
84 } 84 }
85 85
86 void ContentLayerChromium::createTextureUpdaterIfNeeded() 86 void ContentLayerChromium::createTextureUpdaterIfNeeded()
87 { 87 {
88 if (m_textureUpdater) 88 if (m_textureUpdater)
89 return; 89 return;
90 scoped_ptr<LayerPainterChromium> painter = ContentLayerPainter::create(m_cli ent).PassAs<LayerPainterChromium>(); 90 scoped_ptr<LayerPainterChromium> painter = ContentLayerPainter::create(m_cli ent).PassAs<LayerPainterChromium>();
91 if (layerTreeHost()->settings().acceleratePainting) 91 if (layerTreeHost()->settings().acceleratePainting)
92 m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create (painter.Pass()); 92 m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create (painter.Pass());
93 else if (CCSettings::perTilePaintingEnabled()) 93 else if (Settings::perTilePaintingEnabled())
94 m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(pain ter.Pass()); 94 m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(pain ter.Pass());
95 else 95 else
96 m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(painter.Pass( )); 96 m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(painter.Pass( ));
97 m_textureUpdater->setOpaque(contentsOpaque()); 97 m_textureUpdater->setOpaque(contentsOpaque());
98 98
99 GC3Denum textureFormat = layerTreeHost()->rendererCapabilities().bestTexture Format; 99 GC3Denum textureFormat = layerTreeHost()->rendererCapabilities().bestTexture Format;
100 setTextureFormat(textureFormat); 100 setTextureFormat(textureFormat);
101 setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat)); 101 setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat));
102 } 102 }
103 103
104 void ContentLayerChromium::setContentsOpaque(bool opaque) 104 void ContentLayerChromium::setContentsOpaque(bool opaque)
105 { 105 {
106 LayerChromium::setContentsOpaque(opaque); 106 LayerChromium::setContentsOpaque(opaque);
107 if (m_textureUpdater) 107 if (m_textureUpdater)
108 m_textureUpdater->setOpaque(opaque); 108 m_textureUpdater->setOpaque(opaque);
109 } 109 }
110 110
111 } 111 }
OLDNEW
« no previous file with comments | « no previous file | cc/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698