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

Side by Side Diff: cc/ContentLayerChromium.cpp

Issue 10947047: Fix remaining cc files to compile with Clang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FakeCCDelayBasedTimeSource Created 8 years, 3 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/ContentLayerChromium.h ('k') | cc/HeadsUpDisplayLayerChromium.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 "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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 createTextureUpdaterIfNeeded(); 73 createTextureUpdaterIfNeeded();
74 TiledLayerChromium::update(queue, occlusion, stats); 74 TiledLayerChromium::update(queue, occlusion, stats);
75 m_needsDisplay = false; 75 m_needsDisplay = false;
76 } 76 }
77 77
78 bool ContentLayerChromium::needMoreUpdates() 78 bool ContentLayerChromium::needMoreUpdates()
79 { 79 {
80 return needsIdlePaint(); 80 return needsIdlePaint();
81 } 81 }
82 82
83 LayerTextureUpdater* ContentLayerChromium::textureUpdater() const
84 {
85 return m_textureUpdater.get();
86 }
87
83 void ContentLayerChromium::createTextureUpdaterIfNeeded() 88 void ContentLayerChromium::createTextureUpdaterIfNeeded()
84 { 89 {
85 if (m_textureUpdater) 90 if (m_textureUpdater)
86 return; 91 return;
87 if (layerTreeHost()->settings().acceleratePainting) 92 if (layerTreeHost()->settings().acceleratePainting)
88 m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create (ContentLayerPainter::create(m_client)); 93 m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create (ContentLayerPainter::create(m_client));
89 else if (CCSettings::perTilePaintingEnabled()) 94 else if (CCSettings::perTilePaintingEnabled())
90 m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(Cont entLayerPainter::create(m_client)); 95 m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(Cont entLayerPainter::create(m_client));
91 else 96 else
92 m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerP ainter::create(m_client)); 97 m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerP ainter::create(m_client));
93 m_textureUpdater->setOpaque(opaque()); 98 m_textureUpdater->setOpaque(opaque());
94 99
95 GC3Denum textureFormat = layerTreeHost()->rendererCapabilities().bestTexture Format; 100 GC3Denum textureFormat = layerTreeHost()->rendererCapabilities().bestTexture Format;
96 setTextureFormat(textureFormat); 101 setTextureFormat(textureFormat);
97 setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat)); 102 setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat));
98 } 103 }
99 104
100 void ContentLayerChromium::setOpaque(bool opaque) 105 void ContentLayerChromium::setOpaque(bool opaque)
101 { 106 {
102 LayerChromium::setOpaque(opaque); 107 LayerChromium::setOpaque(opaque);
103 if (m_textureUpdater) 108 if (m_textureUpdater)
104 m_textureUpdater->setOpaque(opaque); 109 m_textureUpdater->setOpaque(opaque);
105 } 110 }
106 111
107 } 112 }
108 #endif // USE(ACCELERATED_COMPOSITING) 113 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/ContentLayerChromium.h ('k') | cc/HeadsUpDisplayLayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698