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

Side by Side Diff: cc/test/pixel_test_utils.cc

Issue 559743002: Cleanup: Use base/files/file_util.h instead of base/file_util.h in cc/, chromecast/, cloud_print/, … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win Created 6 years, 3 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
« no previous file with comments | « cc/test/pixel_test.h ('k') | cc/trees/layer_tree_host_common_perftest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "cc/test/pixel_test_utils.h" 5 #include "cc/test/pixel_test_utils.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "third_party/skia/include/core/SkBitmap.h" 13 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/gfx/codec/png_codec.h" 14 #include "ui/gfx/codec/png_codec.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 bool WritePNGFile(const SkBitmap& bitmap, const base::FilePath& file_path, 18 bool WritePNGFile(const SkBitmap& bitmap, const base::FilePath& file_path,
19 bool discard_transparency) { 19 bool discard_transparency) {
20 std::vector<unsigned char> png_data; 20 std::vector<unsigned char> png_data;
21 if (gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, 21 if (gfx::PNGCodec::EncodeBGRASkBitmap(bitmap,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 std::string gen_bmp_data_url = GetPNGDataUrl(gen_bmp); 77 std::string gen_bmp_data_url = GetPNGDataUrl(gen_bmp);
78 std::string ref_bmp_data_url = GetPNGDataUrl(ref_bmp); 78 std::string ref_bmp_data_url = GetPNGDataUrl(ref_bmp);
79 LOG(ERROR) << "Pixels do not match!"; 79 LOG(ERROR) << "Pixels do not match!";
80 LOG(ERROR) << "Actual: " << gen_bmp_data_url; 80 LOG(ERROR) << "Actual: " << gen_bmp_data_url;
81 LOG(ERROR) << "Expected: " << ref_bmp_data_url; 81 LOG(ERROR) << "Expected: " << ref_bmp_data_url;
82 } 82 }
83 return compare; 83 return compare;
84 } 84 }
85 85
86 } // namespace cc 86 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test.h ('k') | cc/trees/layer_tree_host_common_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698