summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornoel <noel@chromium.org>2015-11-09 13:44:51 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-09 21:46:05 +0000
commita1d5cfea190592803aa4d23658f26fdc635906cd (patch)
treeca88f592fc8dbcb31e73c6b536a96f9566c1f9a1
parent14d2827bffed6b8c4928001eb42d9f4dda23dd81 (diff)
downloadchromium_src-a1d5cfea190592803aa4d23658f26fdc635906cd.zip
chromium_src-a1d5cfea190592803aa4d23658f26fdc635906cd.tar.gz
chromium_src-a1d5cfea190592803aa4d23658f26fdc635906cd.tar.bz2
Remove PNGImageReader JPEGImageReader close() routine
The close() routine is only called from the reader destructor: move the code into the class destructor and eliminate close(). Also, Blink style fix the if test in the ~PNGImageReader() to avoid presubmit nit on patch upload. BUG=439655 Review URL: https://codereview.chromium.org/1418423014 Cr-Commit-Position: refs/heads/master@{#358665}
-rw-r--r--third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp5
-rw-r--r--third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp13
2 files changed, 5 insertions, 13 deletions
diff --git a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
index 10c3937..c766f33 100644
--- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
@@ -335,11 +335,6 @@ public:
~JPEGImageReader()
{
- close();
- }
-
- void close()
- {
#if USE(QCMSLIB)
clearColorTransform();
#endif
diff --git a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
index b2f0baf..88d8c69 100644
--- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
@@ -105,17 +105,14 @@ public:
~PNGImageReader()
{
- close();
- }
-
- void close()
- {
- if (m_png && m_info)
- // This will zero the pointers.
- png_destroy_read_struct(&m_png, &m_info, 0);
#if USE(QCMSLIB)
clearColorTransform();
#endif
+ if (m_png && m_info) {
+ // This will zero the pointers.
+ png_destroy_read_struct(&m_png, &m_info, 0);
+ }
+
m_readOffset = 0;
}