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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp

Issue 1746283002: Rename enums/functions that collide in chromium style in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-13-platform: . Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Read and process the bitmasks, if needed. 108 // Read and process the bitmasks, if needed.
109 if (m_needToProcessBitmasks && !processBitmasks()) 109 if (m_needToProcessBitmasks && !processBitmasks())
110 return false; 110 return false;
111 111
112 // Read and process the color table, if needed. 112 // Read and process the color table, if needed.
113 if (m_needToProcessColorTable && !processColorTable()) 113 if (m_needToProcessColorTable && !processColorTable())
114 return false; 114 return false;
115 115
116 // Initialize the framebuffer if needed. 116 // Initialize the framebuffer if needed.
117 ASSERT(m_buffer); // Parent should set this before asking us to decode! 117 ASSERT(m_buffer); // Parent should set this before asking us to decode!
118 if (m_buffer->status() == ImageFrame::FrameEmpty) { 118 if (m_buffer->getStatus() == ImageFrame::FrameEmpty) {
119 if (!m_buffer->setSize(m_parent->size().width(), m_parent->size().height ())) 119 if (!m_buffer->setSize(m_parent->size().width(), m_parent->size().height ()))
120 return m_parent->setFailed(); // Unable to allocate. 120 return m_parent->setFailed(); // Unable to allocate.
121 m_buffer->setStatus(ImageFrame::FramePartial); 121 m_buffer->setStatus(ImageFrame::FramePartial);
122 // setSize() calls eraseARGB(), which resets the alpha flag, so we force 122 // setSize() calls eraseARGB(), which resets the alpha flag, so we force
123 // it back to false here. We'll set it true below in all cases where 123 // it back to false here. We'll set it true below in all cases where
124 // these 0s could actually show through. 124 // these 0s could actually show through.
125 m_buffer->setHasAlpha(false); 125 m_buffer->setHasAlpha(false);
126 126
127 // For BMPs, the frame always fills the entire image. 127 // For BMPs, the frame always fills the entire image.
128 m_buffer->setOriginalFrameRect(IntRect(IntPoint(), m_parent->size())); 128 m_buffer->setOriginalFrameRect(IntRect(IntPoint(), m_parent->size()));
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 // Finished decoding whole image. 804 // Finished decoding whole image.
805 return Success; 805 return Success;
806 } 806 }
807 807
808 void BMPImageReader::moveBufferToNextRow() 808 void BMPImageReader::moveBufferToNextRow()
809 { 809 {
810 m_coord.move(-m_coord.x(), m_isTopDown ? 1 : -1); 810 m_coord.move(-m_coord.x(), m_isTopDown ? 1 : -1);
811 } 811 }
812 812
813 } // namespace blink 813 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698