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

Side by Side Diff: third_party/WebKit/Source/platform/DragImageTest.cpp

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 sk_sp<SkImage> imageForCurrentFrame() override { return m_image; } 68 sk_sp<SkImage> imageForCurrentFrame() override { return m_image; }
69 69
70 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { 70 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override {
71 return false; 71 return false;
72 } 72 }
73 73
74 void destroyDecodedData() override { 74 void destroyDecodedData() override {
75 // Image pure virtual stub. 75 // Image pure virtual stub.
76 } 76 }
77 77
78 void draw(SkCanvas*, 78 void draw(CdlCanvas*,
79 const SkPaint&, 79 const CdlPaint&,
80 const FloatRect&, 80 const FloatRect&,
81 const FloatRect&, 81 const FloatRect&,
82 RespectImageOrientationEnum, 82 RespectImageOrientationEnum,
83 ImageClampingMode) override { 83 ImageClampingMode) override {
84 // Image pure virtual stub. 84 // Image pure virtual stub.
85 } 85 }
86 86
87 private: 87 private:
88 explicit TestImage(sk_sp<SkImage> image) : m_image(image) {} 88 explicit TestImage(sk_sp<SkImage> image) : m_image(image) {}
89 89
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 { 219 {
220 SkAutoLockPixels lock1(dragBitmap); 220 SkAutoLockPixels lock1(dragBitmap);
221 SkAutoLockPixels lock2(expectedBitmap); 221 SkAutoLockPixels lock2(expectedBitmap);
222 for (int x = 0; x < dragBitmap.width(); ++x) 222 for (int x = 0; x < dragBitmap.width(); ++x)
223 for (int y = 0; y < dragBitmap.height(); ++y) 223 for (int y = 0; y < dragBitmap.height(); ++y)
224 EXPECT_EQ(expectedBitmap.getColor(x, y), dragBitmap.getColor(x, y)); 224 EXPECT_EQ(expectedBitmap.getColor(x, y), dragBitmap.getColor(x, y));
225 } 225 }
226 } 226 }
227 227
228 } // namespace blink 228 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698