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

Side by Side Diff: sky/engine/core/rendering/RenderImage.cpp

Issue 735033003: Remove a bunch of dead code from RenderLayer (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cr comments Created 6 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
10 * 10 *
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } else { 176 } else {
177 paintInvalidationRect = contentBoxRect(); 177 paintInvalidationRect = contentBoxRect();
178 } 178 }
179 179
180 { 180 {
181 // FIXME: We should not be allowing paint invalidations during layout. c rbug.com/339584 181 // FIXME: We should not be allowing paint invalidations during layout. c rbug.com/339584
182 AllowPaintInvalidationScope scoper(frameView()); 182 AllowPaintInvalidationScope scoper(frameView());
183 DisableCompositingQueryAsserts disabler; 183 DisableCompositingQueryAsserts disabler;
184 invalidatePaintRectangle(paintInvalidationRect); 184 invalidatePaintRectangle(paintInvalidationRect);
185 } 185 }
186
187 // Tell any potential compositing layers that the image needs updating.
188 contentChanged(ImageChanged);
189 } 186 }
190 187
191 void RenderImage::notifyFinished(Resource* newImage) 188 void RenderImage::notifyFinished(Resource* newImage)
192 { 189 {
193 if (!m_imageResource) 190 if (!m_imageResource)
194 return; 191 return;
195 192
196 if (documentBeingDestroyed()) 193 if (documentBeingDestroyed())
197 return; 194 return;
198 195
199 invalidateBackgroundObscurationStatus(); 196 invalidateBackgroundObscurationStatus();
200
201 if (newImage == m_imageResource->cachedImage()) {
202 // tell any potential compositing layers
203 // that the image is done and they can reference it directly.
204 contentChanged(ImageChanged);
205 }
206 } 197 }
207 198
208 void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf fset) 199 void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf fset)
209 { 200 {
210 GraphicsContext* context = paintInfo.context; 201 GraphicsContext* context = paintInfo.context;
211 202
212 if (m_imageResource->hasImage() && contentWidth() > 0 && contentHeight() > 0 ) { 203 if (m_imageResource->hasImage() && contentWidth() > 0 && contentHeight() > 0 ) {
213 LayoutRect contentRect = contentBoxRect(); 204 LayoutRect contentRect = contentBoxRect();
214 contentRect.moveBy(paintOffset); 205 contentRect.moveBy(paintOffset);
215 LayoutRect paintRect = replacedContentRect(); 206 LayoutRect paintRect = replacedContentRect();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 return; 342 return;
352 } 343 }
353 } 344 }
354 345
355 bool RenderImage::needsPreferredWidthsRecalculation() const 346 bool RenderImage::needsPreferredWidthsRecalculation() const
356 { 347 {
357 return RenderReplaced::needsPreferredWidthsRecalculation(); 348 return RenderReplaced::needsPreferredWidthsRecalculation();
358 } 349 }
359 350
360 } // namespace blink 351 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBoxModelObject.cpp ('k') | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698