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

Side by Side Diff: cc/LayerChromium.h

Issue 11078009: [cc] Use base ptr types for cc's CSS animation classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/CCTimingFunction.cpp ('k') | cc/LayerChromium.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 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 5
6 #ifndef LayerChromium_h 6 #ifndef LayerChromium_h
7 #define LayerChromium_h 7 #define LayerChromium_h
8 8
9 #if USE(ACCELERATED_COMPOSITING) 9 #if USE(ACCELERATED_COMPOSITING)
10 10
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 virtual void setIsMask(bool) { } 189 virtual void setIsMask(bool) { }
190 virtual void bindContentsTexture() { } 190 virtual void bindContentsTexture() { }
191 virtual bool needsContentsScale() const; 191 virtual bool needsContentsScale() const;
192 192
193 void setDebugBorderColor(SkColor); 193 void setDebugBorderColor(SkColor);
194 void setDebugBorderWidth(float); 194 void setDebugBorderWidth(float);
195 void setDebugName(const std::string&); 195 void setDebugName(const std::string&);
196 196
197 virtual void pushPropertiesTo(CCLayerImpl*); 197 virtual void pushPropertiesTo(CCLayerImpl*);
198 198
199 void clearRenderSurface() { m_renderSurface.clear(); } 199 void clearRenderSurface() { m_renderSurface.reset(); }
200 RenderSurfaceChromium* renderSurface() const { return m_renderSurface.get(); } 200 RenderSurfaceChromium* renderSurface() const { return m_renderSurface.get(); }
201 void createRenderSurface(); 201 void createRenderSurface();
202 202
203 float drawOpacity() const { return m_drawOpacity; } 203 float drawOpacity() const { return m_drawOpacity; }
204 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } 204 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; }
205 205
206 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } 206 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; }
207 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI sAnimating = drawOpacityIsAnimating; } 207 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI sAnimating = drawOpacityIsAnimating; }
208 208
209 LayerChromium* renderTarget() const { ASSERT(!m_renderTarget || m_renderTarg et->renderSurface()); return m_renderTarget; } 209 LayerChromium* renderTarget() const { ASSERT(!m_renderTarget || m_renderTarg et->renderSurface()); return m_renderTarget; }
(...skipping 26 matching lines...) Expand all
236 bool boundsContainPageScale() const { return m_boundsContainPageScale; } 236 bool boundsContainPageScale() const { return m_boundsContainPageScale; }
237 237
238 // Returns true if any of the layer's descendants has content to draw. 238 // Returns true if any of the layer's descendants has content to draw.
239 bool descendantDrawsContent(); 239 bool descendantDrawsContent();
240 240
241 CCLayerTreeHost* layerTreeHost() const { return m_layerTreeHost; } 241 CCLayerTreeHost* layerTreeHost() const { return m_layerTreeHost; }
242 242
243 // Set the priority of all desired textures in this layer. 243 // Set the priority of all desired textures in this layer.
244 virtual void setTexturePriorities(const CCPriorityCalculator&) { } 244 virtual void setTexturePriorities(const CCPriorityCalculator&) { }
245 245
246 bool addAnimation(PassOwnPtr<CCActiveAnimation>); 246 bool addAnimation(scoped_ptr<CCActiveAnimation>);
247 void pauseAnimation(int animationId, double timeOffset); 247 void pauseAnimation(int animationId, double timeOffset);
248 void removeAnimation(int animationId); 248 void removeAnimation(int animationId);
249 249
250 void suspendAnimations(double monotonicTime); 250 void suspendAnimations(double monotonicTime);
251 void resumeAnimations(double monotonicTime); 251 void resumeAnimations(double monotonicTime);
252 252
253 CCLayerAnimationController* layerAnimationController() { return m_layerAnima tionController.get(); } 253 CCLayerAnimationController* layerAnimationController() { return m_layerAnima tionController.get(); }
254 void setLayerAnimationController(PassOwnPtr<CCLayerAnimationController>); 254 void setLayerAnimationController(scoped_ptr<CCLayerAnimationController>);
255 PassOwnPtr<CCLayerAnimationController> releaseLayerAnimationController(); 255 scoped_ptr<CCLayerAnimationController> releaseLayerAnimationController();
256 256
257 void setLayerAnimationDelegate(WebKit::WebAnimationDelegate* layerAnimationD elegate) { m_layerAnimationDelegate = layerAnimationDelegate; } 257 void setLayerAnimationDelegate(WebKit::WebAnimationDelegate* layerAnimationD elegate) { m_layerAnimationDelegate = layerAnimationDelegate; }
258 258
259 bool hasActiveAnimation() const; 259 bool hasActiveAnimation() const;
260 260
261 virtual void notifyAnimationStarted(const CCAnimationEvent&, double wallCloc kTime); 261 virtual void notifyAnimationStarted(const CCAnimationEvent&, double wallCloc kTime);
262 virtual void notifyAnimationFinished(double wallClockTime); 262 virtual void notifyAnimationFinished(double wallClockTime);
263 263
264 virtual Region visibleContentOpaqueRegion() const; 264 virtual Region visibleContentOpaqueRegion() const;
265 265
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 void removeChild(LayerChromium*); 310 void removeChild(LayerChromium*);
311 311
312 LayerList m_children; 312 LayerList m_children;
313 LayerChromium* m_parent; 313 LayerChromium* m_parent;
314 314
315 // LayerChromium instances have a weak pointer to their CCLayerTreeHost. 315 // LayerChromium instances have a weak pointer to their CCLayerTreeHost.
316 // This pointer value is nil when a LayerChromium is not in a tree and is 316 // This pointer value is nil when a LayerChromium is not in a tree and is
317 // updated via setLayerTreeHost() if a layer moves between trees. 317 // updated via setLayerTreeHost() if a layer moves between trees.
318 CCLayerTreeHost* m_layerTreeHost; 318 CCLayerTreeHost* m_layerTreeHost;
319 319
320 OwnPtr<CCLayerAnimationController> m_layerAnimationController; 320 scoped_ptr<CCLayerAnimationController> m_layerAnimationController;
321 321
322 // Layer properties. 322 // Layer properties.
323 IntSize m_bounds; 323 IntSize m_bounds;
324 324
325 // Uses layer's content space. 325 // Uses layer's content space.
326 IntRect m_visibleContentRect; 326 IntRect m_visibleContentRect;
327 327
328 IntPoint m_scrollPosition; 328 IntPoint m_scrollPosition;
329 IntSize m_maxScrollPosition; 329 IntSize m_maxScrollPosition;
330 bool m_scrollable; 330 bool m_scrollable;
(...skipping 23 matching lines...) Expand all
354 bool m_drawCheckerboardForMissingTiles; 354 bool m_drawCheckerboardForMissingTiles;
355 bool m_forceRenderSurface; 355 bool m_forceRenderSurface;
356 356
357 WebKit::WebTransformationMatrix m_transform; 357 WebKit::WebTransformationMatrix m_transform;
358 WebKit::WebTransformationMatrix m_sublayerTransform; 358 WebKit::WebTransformationMatrix m_sublayerTransform;
359 359
360 // Replica layer used for reflections. 360 // Replica layer used for reflections.
361 scoped_refptr<LayerChromium> m_replicaLayer; 361 scoped_refptr<LayerChromium> m_replicaLayer;
362 362
363 // Transient properties. 363 // Transient properties.
364 OwnPtr<RenderSurfaceChromium> m_renderSurface; 364 scoped_ptr<RenderSurfaceChromium> m_renderSurface;
365 float m_drawOpacity; 365 float m_drawOpacity;
366 bool m_drawOpacityIsAnimating; 366 bool m_drawOpacityIsAnimating;
367 367
368 LayerChromium* m_renderTarget; 368 LayerChromium* m_renderTarget;
369 369
370 WebKit::WebTransformationMatrix m_drawTransform; 370 WebKit::WebTransformationMatrix m_drawTransform;
371 WebKit::WebTransformationMatrix m_screenSpaceTransform; 371 WebKit::WebTransformationMatrix m_screenSpaceTransform;
372 bool m_drawTransformIsAnimating; 372 bool m_drawTransformIsAnimating;
373 bool m_screenSpaceTransformIsAnimating; 373 bool m_screenSpaceTransformIsAnimating;
374 374
375 // Uses target surface space. 375 // Uses target surface space.
376 IntRect m_drawableContentRect; 376 IntRect m_drawableContentRect;
377 float m_contentsScale; 377 float m_contentsScale;
378 bool m_boundsContainPageScale; 378 bool m_boundsContainPageScale;
379 379
380 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; 380 WebKit::WebAnimationDelegate* m_layerAnimationDelegate;
381 WebKit::WebLayerScrollClient* m_layerScrollClient; 381 WebKit::WebLayerScrollClient* m_layerScrollClient;
382 }; 382 };
383 383
384 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto r<scoped_refptr<LayerChromium> >::iterator, void*); 384 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto r<scoped_refptr<LayerChromium> >::iterator, void*);
385 385
386 } 386 }
387 #endif // USE(ACCELERATED_COMPOSITING) 387 #endif // USE(ACCELERATED_COMPOSITING)
388 388
389 #endif 389 #endif
OLDNEW
« no previous file with comments | « cc/CCTimingFunction.cpp ('k') | cc/LayerChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698