Replace trivial uses of ImageResourceContent::IntrinsicSize
For the cases where an Image has already been extracted from the ImageResourceContent, call Image::Size(...) directly rather than calling ImageResourceContent::IntrinsicSize since the latter only adds a null- check. De-duplicate ImageElementBase::DefaultDestinationSize() since it is identical to ImageElementBase::ElementSize(). In ImageResourceContent::GetCompressionFormat(), there's no need to use the Image::Size overload that takes a RespectImageOrientationEnum since we only need to compute the area of the image - which is the same regardless of orientation. Bug: 773272 Change-Id: I9395ce9304827917d97d6e3cab209f09b4645b2b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2010776Reviewed-by:Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#733935}
Showing
Please register or sign in to comment