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

Side by Side Diff: Source/platform/image-decoders/bmp/BMPImageReader.h

Issue 872683008: Small cleanup on BMPImageReader.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 inline void fillRGBA(int endCoord, 256 inline void fillRGBA(int endCoord,
257 unsigned red, 257 unsigned red,
258 unsigned green, 258 unsigned green,
259 unsigned blue, 259 unsigned blue,
260 unsigned alpha) 260 unsigned alpha)
261 { 261 {
262 while (m_coord.x() < endCoord) 262 while (m_coord.x() < endCoord)
263 setRGBA(red, green, blue, alpha); 263 setRGBA(red, green, blue, alpha);
264 } 264 }
265 265
266 // File header size + info header size in bytes.
267 inline size_t sizeOfHeaderAndInfoHeader() const
Peter Kasting 2015/02/03 23:56:43 Don't add this. Do it inline in the places you ca
changseok 2015/02/04 04:10:32 Done.
268 {
269 return m_headerOffset + m_infoHeader.biSize;
270 }
271
266 // Resets the relevant local variables to start drawing at the left edge 272 // Resets the relevant local variables to start drawing at the left edge
267 // of the "next" row, where "next" is above or below the current row 273 // of the "next" row, where "next" is above or below the current row
268 // depending on the value of |m_isTopDown|. 274 // depending on the value of |m_isTopDown|.
269 void moveBufferToNextRow(); 275 void moveBufferToNextRow();
270 276
271 // The decoder that owns us. 277 // The decoder that owns us.
272 ImageDecoder* m_parent; 278 ImageDecoder* m_parent;
273 279
274 // The destination for the pixel data. 280 // The destination for the pixel data.
275 ImageFrame* m_buffer; 281 ImageFrame* m_buffer;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // ICOs store a 1bpp "mask" immediately after the main bitmap image data 351 // ICOs store a 1bpp "mask" immediately after the main bitmap image data
346 // (and, confusingly, add its height to the biHeight value in the info 352 // (and, confusingly, add its height to the biHeight value in the info
347 // header, thus doubling it). If |m_isInICO| is true, this variable tracks 353 // header, thus doubling it). If |m_isInICO| is true, this variable tracks
348 // whether we've begun decoding this mask yet. 354 // whether we've begun decoding this mask yet.
349 bool m_decodingAndMask; 355 bool m_decodingAndMask;
350 }; 356 };
351 357
352 } // namespace blink 358 } // namespace blink
353 359
354 #endif 360 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698