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

Side by Side Diff: cc/content_layer.cc

Issue 11794019: Avoid exposing gl bindings through cc public API headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/caching_bitmap_content_layer_updater.cc ('k') | cc/content_layer_updater.h » ('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 "cc/content_layer.h" 5 #include "cc/content_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return; 97 return;
98 scoped_ptr<LayerPainter> painter = ContentLayerPainter::create(m_client).Pas sAs<LayerPainter>(); 98 scoped_ptr<LayerPainter> painter = ContentLayerPainter::create(m_client).Pas sAs<LayerPainter>();
99 if (layerTreeHost()->settings().acceleratePainting) 99 if (layerTreeHost()->settings().acceleratePainting)
100 m_updater = SkPictureContentLayerUpdater::create(painter.Pass()); 100 m_updater = SkPictureContentLayerUpdater::create(painter.Pass());
101 else if (layerTreeHost()->settings().perTilePaintingEnabled) 101 else if (layerTreeHost()->settings().perTilePaintingEnabled)
102 m_updater = BitmapSkPictureContentLayerUpdater::create(painter.Pass()); 102 m_updater = BitmapSkPictureContentLayerUpdater::create(painter.Pass());
103 else 103 else
104 m_updater = BitmapContentLayerUpdater::create(painter.Pass()); 104 m_updater = BitmapContentLayerUpdater::create(painter.Pass());
105 m_updater->setOpaque(contentsOpaque()); 105 m_updater->setOpaque(contentsOpaque());
106 106
107 GLenum textureFormat = layerTreeHost()->rendererCapabilities().bestTextureFo rmat; 107 unsigned textureFormat = layerTreeHost()->rendererCapabilities().bestTexture Format;
108 setTextureFormat(textureFormat); 108 setTextureFormat(textureFormat);
109 } 109 }
110 110
111 void ContentLayer::setContentsOpaque(bool opaque) 111 void ContentLayer::setContentsOpaque(bool opaque)
112 { 112 {
113 Layer::setContentsOpaque(opaque); 113 Layer::setContentsOpaque(opaque);
114 if (m_updater) 114 if (m_updater)
115 m_updater->setOpaque(opaque); 115 m_updater->setOpaque(opaque);
116 } 116 }
117 117
(...skipping 25 matching lines...) Expand all
143 // it does not really cause any invalidation. 143 // it does not really cause any invalidation.
144 TRACE_EVENT_INSTANT0("cc", "ContentLayer::canUseLCDTextDidChange"); 144 TRACE_EVENT_INSTANT0("cc", "ContentLayer::canUseLCDTextDidChange");
145 } 145 }
146 ++m_lcdTextChangeCount; 146 ++m_lcdTextChangeCount;
147 147
148 // Need to repaint the layer with different text AA setting. 148 // Need to repaint the layer with different text AA setting.
149 setNeedsDisplay(); 149 setNeedsDisplay();
150 } 150 }
151 151
152 } // namespace cc 152 } // namespace cc
OLDNEW
« no previous file with comments | « cc/caching_bitmap_content_layer_updater.cc ('k') | cc/content_layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698