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

Side by Side Diff: cc/layer_tree_host.h

Issue 11189037: toggle FPS counter in compositor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #ifndef CCLayerTreeHost_h 5 #ifndef CCLayerTreeHost_h
6 #define CCLayerTreeHost_h 6 #define CCLayerTreeHost_h
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 bool requestPartialTextureUpdate(); 196 bool requestPartialTextureUpdate();
197 void deleteTextureAfterCommit(scoped_ptr<CCPrioritizedTexture>); 197 void deleteTextureAfterCommit(scoped_ptr<CCPrioritizedTexture>);
198 198
199 void setDeviceScaleFactor(float); 199 void setDeviceScaleFactor(float);
200 float deviceScaleFactor() const { return m_deviceScaleFactor; } 200 float deviceScaleFactor() const { return m_deviceScaleFactor; }
201 201
202 void setFontAtlas(scoped_ptr<CCFontAtlas>); 202 void setFontAtlas(scoped_ptr<CCFontAtlas>);
203 203
204 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); } 204 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); }
205 205
206 void setShowFPSCounter(bool show);
207
206 protected: 208 protected:
207 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&); 209 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&);
208 bool initialize(); 210 bool initialize();
209 211
210 private: 212 private:
211 typedef std::vector<scoped_refptr<LayerChromium> > LayerList; 213 typedef std::vector<scoped_refptr<LayerChromium> > LayerList;
212 214
213 void initializeRenderer(); 215 void initializeRenderer();
214 216
215 void update(LayerChromium*, CCTextureUpdateQueue&, const CCOcclusionTracker* ); 217 void update(LayerChromium*, CCTextureUpdateQueue&, const CCOcclusionTracker* );
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 scoped_ptr<CCPrioritizedTexture> m_surfaceMemoryPlaceholder; 251 scoped_ptr<CCPrioritizedTexture> m_surfaceMemoryPlaceholder;
250 252
251 CCLayerTreeSettings m_settings; 253 CCLayerTreeSettings m_settings;
252 254
253 IntSize m_layoutViewportSize; 255 IntSize m_layoutViewportSize;
254 IntSize m_deviceViewportSize; 256 IntSize m_deviceViewportSize;
255 float m_deviceScaleFactor; 257 float m_deviceScaleFactor;
256 258
257 bool m_visible; 259 bool m_visible;
258 260
261 bool m_showFPSCounter;
262
259 typedef base::hash_map<WebKit::WebGraphicsContext3D*, scoped_refptr<RateLimi ter> > RateLimiterMap; 263 typedef base::hash_map<WebKit::WebGraphicsContext3D*, scoped_refptr<RateLimi ter> > RateLimiterMap;
260 RateLimiterMap m_rateLimiters; 264 RateLimiterMap m_rateLimiters;
261 265
262 float m_pageScaleFactor; 266 float m_pageScaleFactor;
263 float m_minPageScaleFactor, m_maxPageScaleFactor; 267 float m_minPageScaleFactor, m_maxPageScaleFactor;
264 WebKit::WebTransformationMatrix m_implTransform; 268 WebKit::WebTransformationMatrix m_implTransform;
265 bool m_triggerIdleUpdates; 269 bool m_triggerIdleUpdates;
266 270
267 SkColor m_backgroundColor; 271 SkColor m_backgroundColor;
268 bool m_hasTransparentBackground; 272 bool m_hasTransparentBackground;
269 273
270 typedef ScopedPtrVector<CCPrioritizedTexture> TextureList; 274 typedef ScopedPtrVector<CCPrioritizedTexture> TextureList;
271 TextureList m_deleteTextureAfterCommitList; 275 TextureList m_deleteTextureAfterCommitList;
272 size_t m_partialTextureUpdateRequests; 276 size_t m_partialTextureUpdateRequests;
273 277
274 static bool s_needsFilterContext; 278 static bool s_needsFilterContext;
275 279
276 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost); 280 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost);
277 }; 281 };
278 282
279 } // namespace cc 283 } // namespace cc
280 284
281 #endif 285 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698