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

Side by Side Diff: trunk/Source/platform/graphics/GraphicsLayer.h

Issue 183763024: Revert 168245 "Drop background color optimization for composited..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // Return true if the animation is handled by the compositing system. If thi s returns 225 // Return true if the animation is handled by the compositing system. If thi s returns
226 // false, the animation will be run by AnimationController. 226 // false, the animation will be run by AnimationController.
227 // These methods handle both transitions and keyframe animations. 227 // These methods handle both transitions and keyframe animations.
228 bool addAnimation(PassOwnPtr<blink::WebAnimation>); 228 bool addAnimation(PassOwnPtr<blink::WebAnimation>);
229 void pauseAnimation(int animationId, double /*timeOffset*/); 229 void pauseAnimation(int animationId, double /*timeOffset*/);
230 void removeAnimation(int animationId); 230 void removeAnimation(int animationId);
231 231
232 // Layer contents 232 // Layer contents
233 void setContentsToImage(Image*); 233 void setContentsToImage(Image*);
234 void setContentsToNinePatch(Image*, const IntRect& aperture); 234 void setContentsToNinePatch(Image*, const IntRect& aperture);
235 void setContentsToSolidColor(const Color&);
235 void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(laye r); } 236 void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(laye r); }
236 bool hasContentsLayer() const { return m_contentsLayer; } 237 bool hasContentsLayer() const { return m_contentsLayer; }
237 238
238 // Callback from the underlying graphics system to draw layer contents. 239 // Callback from the underlying graphics system to draw layer contents.
239 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip); 240 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip);
240 241
241 // For hosting this GraphicsLayer in a native layer hierarchy. 242 // For hosting this GraphicsLayer in a native layer hierarchy.
242 blink::WebLayer* platformLayer() const; 243 blink::WebLayer* platformLayer() const;
243 244
244 enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, Comp ositingCoordinatesBottomUp }; 245 enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, Comp ositingCoordinatesBottomUp };
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the original layer. 375 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the original layer.
375 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o f the replica. 376 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o f the replica.
376 377
377 IntRect m_contentsRect; 378 IntRect m_contentsRect;
378 379
379 int m_paintCount; 380 int m_paintCount;
380 381
381 OwnPtr<blink::WebContentLayer> m_layer; 382 OwnPtr<blink::WebContentLayer> m_layer;
382 OwnPtr<blink::WebImageLayer> m_imageLayer; 383 OwnPtr<blink::WebImageLayer> m_imageLayer;
383 OwnPtr<blink::WebNinePatchLayer> m_ninePatchLayer; 384 OwnPtr<blink::WebNinePatchLayer> m_ninePatchLayer;
385 Color m_contentsSolidColor;
386 OwnPtr<blink::WebSolidColorLayer> m_solidColorLayer;
384 blink::WebLayer* m_contentsLayer; 387 blink::WebLayer* m_contentsLayer;
385 // We don't have ownership of m_contentsLayer, but we do want to know if a g iven layer is the 388 // We don't have ownership of m_contentsLayer, but we do want to know if a g iven layer is the
386 // same as our current layer in setContentsTo(). Since m_contentsLayer may b e deleted at this point, 389 // same as our current layer in setContentsTo(). Since m_contentsLayer may b e deleted at this point,
387 // we stash an ID away when we know m_contentsLayer is alive and use that fo r comparisons from that point 390 // we stash an ID away when we know m_contentsLayer is alive and use that fo r comparisons from that point
388 // on. 391 // on.
389 int m_contentsLayerId; 392 int m_contentsLayerId;
390 393
391 Vector<LinkHighlightClient*> m_linkHighlights; 394 Vector<LinkHighlightClient*> m_linkHighlights;
392 395
393 OwnPtr<OpaqueRectTrackingContentLayerDelegate> m_opaqueRectTrackingContentLa yerDelegate; 396 OwnPtr<OpaqueRectTrackingContentLayerDelegate> m_opaqueRectTrackingContentLa yerDelegate;
394 397
395 ScrollableArea* m_scrollableArea; 398 ScrollableArea* m_scrollableArea;
396 GraphicsLayerDebugInfo m_debugInfo; 399 GraphicsLayerDebugInfo m_debugInfo;
397 int m_3dRenderingContext; 400 int m_3dRenderingContext;
398 }; 401 };
399 402
400 403
401 } // namespace WebCore 404 } // namespace WebCore
402 405
403 #ifndef NDEBUG 406 #ifndef NDEBUG
404 // Outside the WebCore namespace for ease of invocation from gdb. 407 // Outside the WebCore namespace for ease of invocation from gdb.
405 void PLATFORM_EXPORT showGraphicsLayerTree(const WebCore::GraphicsLayer*); 408 void PLATFORM_EXPORT showGraphicsLayerTree(const WebCore::GraphicsLayer*);
406 #endif 409 #endif
407 410
408 #endif // GraphicsLayer_h 411 #endif // GraphicsLayer_h
OLDNEW
« no previous file with comments | « trunk/Source/core/rendering/compositing/CompositedLayerMapping.cpp ('k') | trunk/Source/platform/graphics/GraphicsLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698