OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 return 0; | 76 return 0; |
77 | 77 |
78 return m_nativeImage; | 78 return m_nativeImage; |
79 } | 79 } |
80 | 80 |
81 // Stub implementations of pure virtual Image functions. | 81 // Stub implementations of pure virtual Image functions. |
82 virtual void destroyDecodedData(bool) OVERRIDE | 82 virtual void destroyDecodedData(bool) OVERRIDE |
83 { | 83 { |
84 } | 84 } |
85 | 85 |
86 virtual unsigned decodedSize() const OVERRIDE | |
87 { | |
88 return 0u; | |
89 } | |
90 | |
91 virtual bool currentFrameKnownToBeOpaque() OVERRIDE | 86 virtual bool currentFrameKnownToBeOpaque() OVERRIDE |
92 { | 87 { |
93 return false; | 88 return false; |
94 } | 89 } |
95 | 90 |
96 virtual void draw(GraphicsContext*, const FloatRect&, const FloatRect&, Comp
ositeOperator, BlendMode) OVERRIDE | 91 virtual void draw(GraphicsContext*, const FloatRect&, const FloatRect&, Comp
ositeOperator, BlendMode) OVERRIDE |
97 { | 92 { |
98 } | 93 } |
99 | 94 |
100 private: | 95 private: |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // Tests that the drag image is a deep copy. | 134 // Tests that the drag image is a deep copy. |
140 RefPtr<TestImage> testImage(TestImage::create(IntSize(1, 1))); | 135 RefPtr<TestImage> testImage(TestImage::create(IntSize(1, 1))); |
141 OwnPtr<DragImage> dragImage = DragImage::create(testImage.get()); | 136 OwnPtr<DragImage> dragImage = DragImage::create(testImage.get()); |
142 ASSERT_TRUE(dragImage); | 137 ASSERT_TRUE(dragImage); |
143 SkAutoLockPixels lock1(dragImage->bitmap()), lock2(testImage->nativeImag
eForCurrentFrame()->bitmap()); | 138 SkAutoLockPixels lock1(dragImage->bitmap()), lock2(testImage->nativeImag
eForCurrentFrame()->bitmap()); |
144 EXPECT_NE(dragImage->bitmap().getPixels(), testImage->nativeImageForCurr
entFrame()->bitmap().getPixels()); | 139 EXPECT_NE(dragImage->bitmap().getPixels(), testImage->nativeImageForCurr
entFrame()->bitmap().getPixels()); |
145 } | 140 } |
146 } | 141 } |
147 | 142 |
148 } // anonymous namespace | 143 } // anonymous namespace |
OLD | NEW |