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

Side by Side Diff: skia/ext/image_operations_unittest.cc

Issue 12217101: Replace FilePath with base::FilePath in some more top level directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/handle_inheritance_test.cc ('k') | skia/ext/vector_canvas_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 (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 <algorithm> 5 #include <algorithm>
6 #include <iomanip> 6 #include <iomanip>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 std::vector<unsigned char> png; 194 std::vector<unsigned char> png;
195 gfx::PNGCodec::ColorFormat color_format = gfx::PNGCodec::FORMAT_RGBA; 195 gfx::PNGCodec::ColorFormat color_format = gfx::PNGCodec::FORMAT_RGBA;
196 if (!gfx::PNGCodec::Encode( 196 if (!gfx::PNGCodec::Encode(
197 reinterpret_cast<const unsigned char*>(bmp.getPixels()), 197 reinterpret_cast<const unsigned char*>(bmp.getPixels()),
198 color_format, gfx::Size(bmp.width(), bmp.height()), 198 color_format, gfx::Size(bmp.width(), bmp.height()),
199 static_cast<int>(bmp.rowBytes()), 199 static_cast<int>(bmp.rowBytes()),
200 false, std::vector<gfx::PNGCodec::Comment>(), &png)) { 200 false, std::vector<gfx::PNGCodec::Comment>(), &png)) {
201 FAIL() << "Failed to encode image"; 201 FAIL() << "Failed to encode image";
202 } 202 }
203 203
204 const FilePath fpath(path); 204 const base::FilePath fpath(path);
205 const int num_written = 205 const int num_written =
206 file_util::WriteFile(fpath, reinterpret_cast<const char*>(&png[0]), 206 file_util::WriteFile(fpath, reinterpret_cast<const char*>(&png[0]),
207 png.size()); 207 png.size());
208 if (num_written != static_cast<int>(png.size())) { 208 if (num_written != static_cast<int>(png.size())) {
209 FAIL() << "Failed to write dest \"" << path << '"'; 209 FAIL() << "Failed to write dest \"" << path << '"';
210 } 210 }
211 } 211 }
212 #endif // #if DEBUG_BITMAP_GENERATION 212 #endif // #if DEBUG_BITMAP_GENERATION
213 213
214 void CheckResampleToSame(skia::ImageOperations::ResizeMethod method) { 214 void CheckResampleToSame(skia::ImageOperations::ResizeMethod method) {
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 ADD_FAILURE() << "Maximum observed color distance: " 625 ADD_FAILURE() << "Maximum observed color distance: "
626 << max_observed_distance; 626 << max_observed_distance;
627 627
628 #if DEBUG_BITMAP_GENERATION 628 #if DEBUG_BITMAP_GENERATION
629 SaveBitmapToPNG(src, "/tmp/CompareLanczosMethods_source.png"); 629 SaveBitmapToPNG(src, "/tmp/CompareLanczosMethods_source.png");
630 SaveBitmapToPNG(dest_l2, "/tmp/CompareLanczosMethods_lanczos2.png"); 630 SaveBitmapToPNG(dest_l2, "/tmp/CompareLanczosMethods_lanczos2.png");
631 SaveBitmapToPNG(dest_l3, "/tmp/CompareLanczosMethods_lanczos3.png"); 631 SaveBitmapToPNG(dest_l3, "/tmp/CompareLanczosMethods_lanczos3.png");
632 #endif // #if DEBUG_BITMAP_GENERATION 632 #endif // #if DEBUG_BITMAP_GENERATION
633 } 633 }
634 } 634 }
OLDNEW
« no previous file with comments | « sandbox/win/src/handle_inheritance_test.cc ('k') | skia/ext/vector_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698