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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h

Issue 10201008: Merge 114475 - [chromium] Ensure RateLimiter waits for Swapbuffers completion (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 bool usingAcceleratedPainting; 116 bool usingAcceleratedPainting;
117 bool usingSetVisibility; 117 bool usingSetVisibility;
118 bool usingSwapCompleteCallback; 118 bool usingSwapCompleteCallback;
119 bool usingTextureUsageHint; 119 bool usingTextureUsageHint;
120 bool usingTextureStorageExtension; 120 bool usingTextureStorageExtension;
121 bool usingGpuMemoryManager; 121 bool usingGpuMemoryManager;
122 bool usingDiscardFramebuffer; 122 bool usingDiscardFramebuffer;
123 int maxTextureSize; 123 int maxTextureSize;
124 }; 124 };
125 125
126 class CCLayerTreeHost : public RefCounted<CCLayerTreeHost> { 126 class CCLayerTreeHost : public RefCounted<CCLayerTreeHost>, public RateLimiterCl ient {
127 public: 127 public:
128 static PassRefPtr<CCLayerTreeHost> create(CCLayerTreeHostClient*, const CCSe ttings&); 128 static PassRefPtr<CCLayerTreeHost> create(CCLayerTreeHostClient*, const CCSe ttings&);
129 virtual ~CCLayerTreeHost(); 129 virtual ~CCLayerTreeHost();
130 130
131 // Returns true if any CCLayerTreeHost is alive. 131 // Returns true if any CCLayerTreeHost is alive.
132 static bool anyLayerTreeHostInstanceExists(); 132 static bool anyLayerTreeHostInstanceExists();
133 133
134 static bool needsFilterContext() { return s_needsFilterContext; } 134 static bool needsFilterContext() { return s_needsFilterContext; }
135 static void setNeedsFilterContext(bool needsFilterContext) { s_needsFilterCo ntext = needsFilterContext; } 135 static void setNeedsFilterContext(bool needsFilterContext) { s_needsFilterCo ntext = needsFilterContext; }
136 136
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool visible() const { return m_visible; } 209 bool visible() const { return m_visible; }
210 void setVisible(bool); 210 void setVisible(bool);
211 211
212 void startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor, float scale, double durationSec); 212 void startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor, float scale, double durationSec);
213 213
214 void updateCompositorResources(GraphicsContext3D*, CCTextureUpdater&); 214 void updateCompositorResources(GraphicsContext3D*, CCTextureUpdater&);
215 void applyScrollAndScale(const CCScrollAndScaleSet&); 215 void applyScrollAndScale(const CCScrollAndScaleSet&);
216 void startRateLimiter(GraphicsContext3D*); 216 void startRateLimiter(GraphicsContext3D*);
217 void stopRateLimiter(GraphicsContext3D*); 217 void stopRateLimiter(GraphicsContext3D*);
218 218
219 // RateLimitClient implementation
220 virtual void rateLimit() OVERRIDE;
221
219 bool requestPartialTextureUpdate(); 222 bool requestPartialTextureUpdate();
220 void deleteTextureAfterCommit(PassOwnPtr<ManagedTexture>); 223 void deleteTextureAfterCommit(PassOwnPtr<ManagedTexture>);
221 224
222 protected: 225 protected:
223 CCLayerTreeHost(CCLayerTreeHostClient*, const CCSettings&); 226 CCLayerTreeHost(CCLayerTreeHostClient*, const CCSettings&);
224 bool initialize(); 227 bool initialize();
225 228
226 private: 229 private:
227 typedef Vector<RefPtr<LayerChromium> > LayerList; 230 typedef Vector<RefPtr<LayerChromium> > LayerList;
228 typedef Vector<OwnPtr<ManagedTexture> > TextureList; 231 typedef Vector<OwnPtr<ManagedTexture> > TextureList;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 Color m_backgroundColor; 279 Color m_backgroundColor;
277 280
278 TextureList m_deleteTextureAfterCommitList; 281 TextureList m_deleteTextureAfterCommitList;
279 size_t m_partialTextureUpdateRequests; 282 size_t m_partialTextureUpdateRequests;
280 static bool s_needsFilterContext; 283 static bool s_needsFilterContext;
281 }; 284 };
282 285
283 } 286 }
284 287
285 #endif 288 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698