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

Side by Side Diff: webkit/port/platform/graphics/skia/public/VectorCanvas_unittest.cpp

Issue 11244: Move PlatformCanvas and PlatformDevice from base/gfx to webkit/port. I left h... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/base/gfx/vector_canvas_unittest.cc:r69-2775
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/gfx/vector_canvas.h" 5 #include "VectorCanvas.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/gfx/gdi_util.h" 11 #include "base/gfx/gdi_util.h"
12 #include "base/gfx/png_decoder.h" 12 #include "base/gfx/png_decoder.h"
13 #include "base/gfx/png_encoder.h" 13 #include "base/gfx/png_encoder.h"
14 #include "base/gfx/size.h" 14 #include "base/gfx/size.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 compressed.size())); 348 compressed.size()));
349 EXPECT_TRUE(PNGDecoder::Decode(&data, bitmap)); 349 EXPECT_TRUE(PNGDecoder::Decode(&data, bitmap));
350 EXPECT_FALSE(bitmap->isOpaque()); 350 EXPECT_FALSE(bitmap->isOpaque());
351 Premultiply(*bitmap); 351 Premultiply(*bitmap);
352 } 352 }
353 353
354 } // namespace 354 } // namespace
355 355
356 // Streams an image. 356 // Streams an image.
357 inline std::ostream& operator<<(std::ostream& out, const Image& image) { 357 inline std::ostream& operator<<(std::ostream& out, const Image& image) {
358 return out << "Image(" << image.size() << ", " << image.row_length() << ")"; 358 return out << "Image(" << image.size().width() << ", "
359 << image.size().height() << ", " << image.row_length() << ")";
359 } 360 }
360 361
361 // Runs simultaneously the same drawing commands on VectorCanvas and 362 // Runs simultaneously the same drawing commands on VectorCanvas and
362 // PlatformCanvas and compare the results. 363 // PlatformCanvas and compare the results.
363 class VectorCanvasTest : public ImageTest { 364 class VectorCanvasTest : public ImageTest {
364 public: 365 public:
365 typedef ImageTest parent; 366 typedef ImageTest parent;
366 367
367 VectorCanvasTest() : parent(L"base", CurrentMode()), compare_canvas_(true) { 368 VectorCanvasTest() : parent(L"base", CurrentMode()), compare_canvas_(true) {
368 } 369 }
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 1000
1000 { 1001 {
1001 vcanvas_->rotate(67); 1002 vcanvas_->rotate(67);
1002 pcanvas_->rotate(67); 1003 pcanvas_->rotate(67);
1003 vcanvas_->drawBitmap(bitmap, 20, -50, NULL); 1004 vcanvas_->drawBitmap(bitmap, 20, -50, NULL);
1004 pcanvas_->drawBitmap(bitmap, 20, -50, NULL); 1005 pcanvas_->drawBitmap(bitmap, 20, -50, NULL);
1005 EXPECT_EQ(0., ProcessImage(L"rotate")); 1006 EXPECT_EQ(0., ProcessImage(L"rotate"));
1006 } 1007 }
1007 } 1008 }
1008 1009
OLDNEW
« no previous file with comments | « webkit/port/platform/graphics/skia/public/VectorCanvas.cpp ('k') | webkit/port/platform/graphics/skia/public/VectorDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698