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

Side by Side Diff: tools/imagediff/image_diff_png.cc

Issue 213363003: Delete some dead code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: brettw Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/trace.cc ('k') | ui/accessibility/ax_tree_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/imagediff/image_diff_png.h" 5 #include "tools/imagediff/image_diff_png.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 19 matching lines...) Expand all
30 // This is the default Windows DIB order. 30 // This is the default Windows DIB order.
31 FORMAT_BGRA, 31 FORMAT_BGRA,
32 32
33 // 4 bytes per pixel, in pre-multiplied kARGB_8888_Config format. For use 33 // 4 bytes per pixel, in pre-multiplied kARGB_8888_Config format. For use
34 // with directly writing to a skia bitmap. 34 // with directly writing to a skia bitmap.
35 FORMAT_SkBitmap 35 FORMAT_SkBitmap
36 }; 36 };
37 37
38 // Represents a comment in the tEXt ancillary chunk of the png. 38 // Represents a comment in the tEXt ancillary chunk of the png.
39 struct Comment { 39 struct Comment {
40 Comment(const std::string& k, const std::string& t)
41 : key(k), text(t) {
42 }
43
44 ~Comment() {
45 };
46
47 std::string key; 40 std::string key;
48 std::string text; 41 std::string text;
49 }; 42 };
50 43
51 // Converts BGRA->RGBA and RGBA->BGRA. 44 // Converts BGRA->RGBA and RGBA->BGRA.
52 void ConvertBetweenBGRAandRGBA(const unsigned char* input, int pixel_width, 45 void ConvertBetweenBGRAandRGBA(const unsigned char* input, int pixel_width,
53 unsigned char* output, bool* is_opaque) { 46 unsigned char* output, bool* is_opaque) {
54 for (int x = 0; x < pixel_width; x++) { 47 for (int x = 0; x < pixel_width; x++) {
55 const unsigned char* pixel_in = &input[x * 4]; 48 const unsigned char* pixel_in = &input[x * 4];
56 unsigned char* pixel_out = &output[x * 4]; 49 unsigned char* pixel_out = &output[x * 4];
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 int height, 634 int height,
642 int row_byte_width, 635 int row_byte_width,
643 bool discard_transparency, 636 bool discard_transparency,
644 std::vector<unsigned char>* output) { 637 std::vector<unsigned char>* output) {
645 return Encode(input, FORMAT_BGRA, 638 return Encode(input, FORMAT_BGRA,
646 width, height, row_byte_width, discard_transparency, 639 width, height, row_byte_width, discard_transparency,
647 std::vector<Comment>(), output); 640 std::vector<Comment>(), output);
648 } 641 }
649 642
650 } // image_diff_png 643 } // image_diff_png
OLDNEW
« no previous file with comments | « tools/gn/trace.cc ('k') | ui/accessibility/ax_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698