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

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

Issue 860843006: Delete blink::ImageQualityController (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/rendering/RenderBoxModelObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 { 200 {
201 IntRect alignedRect = pixelSnappedIntRect(rect); 201 IntRect alignedRect = pixelSnappedIntRect(rect);
202 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred() || alig nedRect.width() <= 0 || alignedRect.height() <= 0) 202 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred() || alig nedRect.width() <= 0 || alignedRect.height() <= 0)
203 return; 203 return;
204 204
205 RefPtr<Image> img = m_imageResource->image(alignedRect.width(), alignedRect. height()); 205 RefPtr<Image> img = m_imageResource->image(alignedRect.width(), alignedRect. height());
206 if (!img || img->isNull()) 206 if (!img || img->isNull())
207 return; 207 return;
208 208
209 Image* image = img.get(); 209 Image* image = img.get();
210 InterpolationQuality interpolationQuality = chooseInterpolationQuality(conte xt, image, image, alignedRect.size());
211 210
212 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(*this)); 211 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(*this));
213 InterpolationQuality previousInterpolationQuality = context->imageInterpolat ionQuality(); 212 InterpolationQuality previousInterpolationQuality = context->imageInterpolat ionQuality();
214 context->setImageInterpolationQuality(interpolationQuality); 213 context->setImageInterpolationQuality(InterpolationLow);
215 context->drawImage(image, alignedRect, CompositeSourceOver, shouldRespectIma geOrientation()); 214 context->drawImage(image, alignedRect, CompositeSourceOver, shouldRespectIma geOrientation());
216 context->setImageInterpolationQuality(previousInterpolationQuality); 215 context->setImageInterpolationQuality(previousInterpolationQuality);
217 } 216 }
218 217
219 LayoutUnit RenderImage::minimumReplacedHeight() const 218 LayoutUnit RenderImage::minimumReplacedHeight() const
220 { 219 {
221 return m_imageResource->errorOccurred() ? intrinsicSize().height() : LayoutU nit(); 220 return m_imageResource->errorOccurred() ? intrinsicSize().height() : LayoutU nit();
222 } 221 }
223 222
224 bool RenderImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu lt, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOf fset, HitTestAction hitTestAction) 223 bool RenderImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu lt, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOf fset, HitTestAction hitTestAction)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 return; 261 return;
263 } 262 }
264 } 263 }
265 264
266 bool RenderImage::needsPreferredWidthsRecalculation() const 265 bool RenderImage::needsPreferredWidthsRecalculation() const
267 { 266 {
268 return RenderReplaced::needsPreferredWidthsRecalculation(); 267 return RenderReplaced::needsPreferredWidthsRecalculation();
269 } 268 }
270 269
271 } // namespace blink 270 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBoxModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698