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

Side by Side Diff: Source/platform/graphics/ImageSource.cpp

Issue 1296543003: Use transposedSize in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove transposedRect change Created 5 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
« no previous file with comments | « Source/platform/graphics/BitmapImage.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) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk> 3 * Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk>
4 * Copyright (C) 2008, Google Inc. All rights reserved. 4 * Copyright (C) 2008, Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return frameSizeAtIndex(0, shouldRespectOrientation); 78 return frameSizeAtIndex(0, shouldRespectOrientation);
79 } 79 }
80 80
81 IntSize ImageSource::frameSizeAtIndex(size_t index, RespectImageOrientationEnum shouldRespectOrientation) const 81 IntSize ImageSource::frameSizeAtIndex(size_t index, RespectImageOrientationEnum shouldRespectOrientation) const
82 { 82 {
83 if (!m_decoder) 83 if (!m_decoder)
84 return IntSize(); 84 return IntSize();
85 85
86 IntSize size = m_decoder->frameSizeAtIndex(index); 86 IntSize size = m_decoder->frameSizeAtIndex(index);
87 if ((shouldRespectOrientation == RespectImageOrientation) && m_decoder->orie ntationAtIndex(index).usesWidthAsHeight()) 87 if ((shouldRespectOrientation == RespectImageOrientation) && m_decoder->orie ntationAtIndex(index).usesWidthAsHeight())
88 return IntSize(size.height(), size.width()); 88 return size.transposedSize();
89 89
90 return size; 90 return size;
91 } 91 }
92 92
93 bool ImageSource::getHotSpot(IntPoint& hotSpot) const 93 bool ImageSource::getHotSpot(IntPoint& hotSpot) const
94 { 94 {
95 return m_decoder ? m_decoder->hotSpot(hotSpot) : false; 95 return m_decoder ? m_decoder->hotSpot(hotSpot) : false;
96 } 96 }
97 97
98 int ImageSource::repetitionCount() 98 int ImageSource::repetitionCount()
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 147 {
148 return m_decoder && m_decoder->frameIsCachedAndLazyDecodedAtIndex(index); 148 return m_decoder && m_decoder->frameIsCachedAndLazyDecodedAtIndex(index);
149 } 149 }
150 150
151 size_t ImageSource::frameBytesAtIndex(size_t index) const 151 size_t ImageSource::frameBytesAtIndex(size_t index) const
152 { 152 {
153 return m_decoder ? m_decoder->frameBytesAtIndex(index) : 0; 153 return m_decoder ? m_decoder->frameBytesAtIndex(index) : 0;
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/BitmapImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698