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

Side by Side Diff: Source/core/rendering/compositing/GraphicsLayerUpdater.cpp

Issue 457473002: Remove the CompositedLayerMappingPtr smart ptr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void GraphicsLayerUpdater::update(RenderLayer& layer, Vector<RenderLayer*>& laye rsNeedingPaintInvalidation) 84 void GraphicsLayerUpdater::update(RenderLayer& layer, Vector<RenderLayer*>& laye rsNeedingPaintInvalidation)
85 { 85 {
86 TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::update"); 86 TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::update");
87 updateRecursive(layer, DoNotForceUpdate, UpdateContext(), layersNeedingPaint Invalidation); 87 updateRecursive(layer, DoNotForceUpdate, UpdateContext(), layersNeedingPaint Invalidation);
88 layer.compositor()->updateRootLayerPosition(); 88 layer.compositor()->updateRootLayerPosition();
89 } 89 }
90 90
91 void GraphicsLayerUpdater::updateRecursive(RenderLayer& layer, UpdateType update Type, const UpdateContext& context, Vector<RenderLayer*>& layersNeedingPaintInva lidation) 91 void GraphicsLayerUpdater::updateRecursive(RenderLayer& layer, UpdateType update Type, const UpdateContext& context, Vector<RenderLayer*>& layersNeedingPaintInva lidation)
92 { 92 {
93 if (layer.hasCompositedLayerMapping()) { 93 if (layer.hasCompositedLayerMapping()) {
94 CompositedLayerMappingPtr mapping = layer.compositedLayerMapping(); 94 CompositedLayerMapping* mapping = layer.compositedLayerMapping();
95 95
96 if (updateType == ForceUpdate || mapping->needsGraphicsLayerUpdate()) { 96 if (updateType == ForceUpdate || mapping->needsGraphicsLayerUpdate()) {
97 const RenderLayer* compositingContainer = context.compositingContain er(layer); 97 const RenderLayer* compositingContainer = context.compositingContain er(layer);
98 ASSERT(compositingContainer == layer.enclosingLayerWithCompositedLay erMapping(ExcludeSelf)); 98 ASSERT(compositingContainer == layer.enclosingLayerWithCompositedLay erMapping(ExcludeSelf));
99 99
100 if (mapping->updateRequiresOwnBackingStoreForAncestorReasons(composi tingContainer)) { 100 if (mapping->updateRequiresOwnBackingStoreForAncestorReasons(composi tingContainer)) {
101 layersNeedingPaintInvalidation.append(&layer); 101 layersNeedingPaintInvalidation.append(&layer);
102 updateType = ForceUpdate; 102 updateType = ForceUpdate;
103 } 103 }
104 104
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (layer.hasCompositedLayerMapping()) 136 if (layer.hasCompositedLayerMapping())
137 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea red(); 137 layer.compositedLayerMapping()->assertNeedsToUpdateGraphicsLayerBitsClea red();
138 138
139 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl ing()) 139 for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibl ing())
140 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); 140 assertNeedsToUpdateGraphicsLayerBitsCleared(*child);
141 } 141 }
142 142
143 #endif 143 #endif
144 144
145 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698