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

Side by Side Diff: cc/CCLayerTreeHost.h

Issue 11035071: [cc] Remove all WTF #includes from CCLayerTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCDelegatedRendererLayerImplTest.cpp ('k') | cc/CCLayerTreeHost.cpp » ('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 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/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "cc/own_ptr_vector.h"
12 #include "CCAnimationEvents.h" 12 #include "CCAnimationEvents.h"
13 #include "CCGraphicsContext.h" 13 #include "CCGraphicsContext.h"
14 #include "CCLayerTreeHostClient.h" 14 #include "CCLayerTreeHostClient.h"
15 #include "CCLayerTreeHostCommon.h" 15 #include "CCLayerTreeHostCommon.h"
16 #include "CCOcclusionTracker.h" 16 #include "CCOcclusionTracker.h"
17 #include "CCPrioritizedTextureManager.h" 17 #include "CCPrioritizedTextureManager.h"
18 #include "CCProxy.h" 18 #include "CCProxy.h"
19 #include "CCRenderingStats.h" 19 #include "CCRenderingStats.h"
20 #include "IntRect.h" 20 #include "IntRect.h"
21 #include "RateLimiter.h" 21 #include "RateLimiter.h"
22 #include "scoped_ptr_vector.h"
22 #include "SkColor.h" 23 #include "SkColor.h"
23 #include <limits> 24 #include <limits>
24 #include <wtf/HashMap.h> 25
25 #include <wtf/OwnPtr.h> 26 #if defined(COMPILER_GCC)
26 #include <wtf/PassOwnPtr.h> 27 namespace BASE_HASH_NAMESPACE {
28 template<>
29 struct hash<WebKit::WebGraphicsContext3D*> {
30 size_t operator()(WebKit::WebGraphicsContext3D* ptr) const {
31 return hash<size_t>()(reinterpret_cast<size_t>(ptr));
32 }
33 };
34 } // namespace BASE_HASH_NAMESPACE
35 #endif // COMPILER
27 36
28 namespace cc { 37 namespace cc {
29 38
30 class CCFontAtlas; 39 class CCFontAtlas;
31 class CCLayerChromium; 40 class CCLayerChromium;
32 class CCLayerTreeHostImpl; 41 class CCLayerTreeHostImpl;
33 class CCLayerTreeHostImplClient; 42 class CCLayerTreeHostImplClient;
34 class CCPrioritizedTextureManager; 43 class CCPrioritizedTextureManager;
35 class CCTextureUpdateQueue; 44 class CCTextureUpdateQueue;
36 class HeadsUpDisplayLayerChromium; 45 class HeadsUpDisplayLayerChromium;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 149
141 // Test only hook 150 // Test only hook
142 void loseContext(int numTimes); 151 void loseContext(int numTimes);
143 152
144 void setNeedsAnimate(); 153 void setNeedsAnimate();
145 // virtual for testing 154 // virtual for testing
146 virtual void setNeedsCommit(); 155 virtual void setNeedsCommit();
147 void setNeedsRedraw(); 156 void setNeedsRedraw();
148 bool commitRequested() const; 157 bool commitRequested() const;
149 158
150 void setAnimationEvents(PassOwnPtr<CCAnimationEventsVector>, double wallCloc kTime); 159 void setAnimationEvents(scoped_ptr<CCAnimationEventsVector>, double wallCloc kTime);
151 virtual void didAddAnimation(); 160 virtual void didAddAnimation();
152 161
153 LayerChromium* rootLayer() { return m_rootLayer.get(); } 162 LayerChromium* rootLayer() { return m_rootLayer.get(); }
154 const LayerChromium* rootLayer() const { return m_rootLayer.get(); } 163 const LayerChromium* rootLayer() const { return m_rootLayer.get(); }
155 void setRootLayer(scoped_refptr<LayerChromium>); 164 void setRootLayer(scoped_refptr<LayerChromium>);
156 165
157 const CCLayerTreeSettings& settings() const { return m_settings; } 166 const CCLayerTreeSettings& settings() const { return m_settings; }
158 167
159 void setViewportSize(const IntSize& layoutViewportSize, const IntSize& devic eViewportSize); 168 void setViewportSize(const IntSize& layoutViewportSize, const IntSize& devic eViewportSize);
160 169
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void applyScrollAndScale(const CCScrollAndScaleSet&); 202 void applyScrollAndScale(const CCScrollAndScaleSet&);
194 203
195 void startRateLimiter(WebKit::WebGraphicsContext3D*); 204 void startRateLimiter(WebKit::WebGraphicsContext3D*);
196 void stopRateLimiter(WebKit::WebGraphicsContext3D*); 205 void stopRateLimiter(WebKit::WebGraphicsContext3D*);
197 206
198 // RateLimitClient implementation 207 // RateLimitClient implementation
199 virtual void rateLimit() OVERRIDE; 208 virtual void rateLimit() OVERRIDE;
200 209
201 bool bufferedUpdates(); 210 bool bufferedUpdates();
202 bool requestPartialTextureUpdate(); 211 bool requestPartialTextureUpdate();
203 void deleteTextureAfterCommit(PassOwnPtr<CCPrioritizedTexture>); 212 void deleteTextureAfterCommit(scoped_ptr<CCPrioritizedTexture>);
204 213
205 void setDeviceScaleFactor(float); 214 void setDeviceScaleFactor(float);
206 float deviceScaleFactor() const { return m_deviceScaleFactor; } 215 float deviceScaleFactor() const { return m_deviceScaleFactor; }
207 216
208 void setFontAtlas(scoped_ptr<CCFontAtlas>); 217 void setFontAtlas(scoped_ptr<CCFontAtlas>);
209 218
210 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); } 219 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); }
211 220
212 protected: 221 protected:
213 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&); 222 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&);
(...skipping 20 matching lines...) Expand all
234 void setAnimationEventsRecursive(const CCAnimationEventsVector&, LayerChromi um*, double wallClockTime); 243 void setAnimationEventsRecursive(const CCAnimationEventsVector&, LayerChromi um*, double wallClockTime);
235 244
236 bool m_animating; 245 bool m_animating;
237 bool m_needsAnimateLayers; 246 bool m_needsAnimateLayers;
238 247
239 CCLayerTreeHostClient* m_client; 248 CCLayerTreeHostClient* m_client;
240 249
241 int m_commitNumber; 250 int m_commitNumber;
242 CCRenderingStats m_renderingStats; 251 CCRenderingStats m_renderingStats;
243 252
244 OwnPtr<CCProxy> m_proxy; 253 scoped_ptr<CCProxy> m_proxy;
245 bool m_rendererInitialized; 254 bool m_rendererInitialized;
246 bool m_contextLost; 255 bool m_contextLost;
247 int m_numTimesRecreateShouldFail; 256 int m_numTimesRecreateShouldFail;
248 int m_numFailedRecreateAttempts; 257 int m_numFailedRecreateAttempts;
249 258
250 scoped_refptr<LayerChromium> m_rootLayer; 259 scoped_refptr<LayerChromium> m_rootLayer;
251 scoped_refptr<HeadsUpDisplayLayerChromium> m_hudLayer; 260 scoped_refptr<HeadsUpDisplayLayerChromium> m_hudLayer;
252 scoped_ptr<CCFontAtlas> m_fontAtlas; 261 scoped_ptr<CCFontAtlas> m_fontAtlas;
253 262
254 OwnPtr<CCPrioritizedTextureManager> m_contentsTextureManager; 263 scoped_ptr<CCPrioritizedTextureManager> m_contentsTextureManager;
255 OwnPtr<CCPrioritizedTexture> m_surfaceMemoryPlaceholder; 264 scoped_ptr<CCPrioritizedTexture> m_surfaceMemoryPlaceholder;
256 265
257 CCLayerTreeSettings m_settings; 266 CCLayerTreeSettings m_settings;
258 267
259 IntSize m_layoutViewportSize; 268 IntSize m_layoutViewportSize;
260 IntSize m_deviceViewportSize; 269 IntSize m_deviceViewportSize;
261 float m_deviceScaleFactor; 270 float m_deviceScaleFactor;
262 271
263 bool m_visible; 272 bool m_visible;
264 273
265 typedef HashMap<WebKit::WebGraphicsContext3D*, RefPtr<RateLimiter> > RateLim iterMap; 274 typedef base::hash_map<WebKit::WebGraphicsContext3D*, scoped_refptr<RateLimi ter> > RateLimiterMap;
266 RateLimiterMap m_rateLimiters; 275 RateLimiterMap m_rateLimiters;
267 276
268 float m_pageScaleFactor; 277 float m_pageScaleFactor;
269 float m_minPageScaleFactor, m_maxPageScaleFactor; 278 float m_minPageScaleFactor, m_maxPageScaleFactor;
270 bool m_triggerIdleUpdates; 279 bool m_triggerIdleUpdates;
271 280
272 SkColor m_backgroundColor; 281 SkColor m_backgroundColor;
273 bool m_hasTransparentBackground; 282 bool m_hasTransparentBackground;
274 283
275 typedef OwnPtrVector<CCPrioritizedTexture> TextureList; 284 typedef ScopedPtrVector<CCPrioritizedTexture> TextureList;
276 TextureList m_deleteTextureAfterCommitList; 285 TextureList m_deleteTextureAfterCommitList;
277 size_t m_partialTextureUpdateRequests; 286 size_t m_partialTextureUpdateRequests;
278 287
279 static bool s_needsFilterContext; 288 static bool s_needsFilterContext;
280 289
281 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost); 290 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost);
282 }; 291 };
283 292
284 } // namespace cc 293 } // namespace cc
285 294
286 #endif 295 #endif
OLDNEW
« no previous file with comments | « cc/CCDelegatedRendererLayerImplTest.cpp ('k') | cc/CCLayerTreeHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698