| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 virtual unsigned decodedSize() const OVERRIDE | 80 virtual unsigned decodedSize() const OVERRIDE |
| 81 { | 81 { |
| 82 return 0u; | 82 return 0u; |
| 83 } | 83 } |
| 84 | 84 |
| 85 virtual bool currentFrameKnownToBeOpaque() OVERRIDE | 85 virtual bool currentFrameKnownToBeOpaque() OVERRIDE |
| 86 { | 86 { |
| 87 return false; | 87 return false; |
| 88 } | 88 } |
| 89 | 89 |
| 90 virtual void draw(GraphicsContext*, const FloatRect&, const FloatRect&, Colo
rSpace, CompositeOperator, BlendMode) OVERRIDE | 90 virtual void draw(GraphicsContext*, const FloatRect&, const FloatRect&, Comp
ositeOperator, BlendMode) OVERRIDE |
| 91 { | 91 { |
| 92 } | 92 } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 | 95 |
| 96 IntSize m_size; | 96 IntSize m_size; |
| 97 | 97 |
| 98 RefPtr<NativeImageSkia> m_nativeImage; | 98 RefPtr<NativeImageSkia> m_nativeImage; |
| 99 }; | 99 }; |
| 100 | 100 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Tests that the drag image is a deep copy. | 141 // Tests that the drag image is a deep copy. |
| 142 RefPtr<TestImage> testImage(TestImage::create(IntSize(1, 1))); | 142 RefPtr<TestImage> testImage(TestImage::create(IntSize(1, 1))); |
| 143 DragImageRef dragImage = createDragImageFromImage(testImage.get()); | 143 DragImageRef dragImage = createDragImageFromImage(testImage.get()); |
| 144 ASSERT_TRUE(dragImage); | 144 ASSERT_TRUE(dragImage); |
| 145 SkAutoLockPixels lock1(*dragImage->bitmap), lock2(testImage->nativeImage
ForCurrentFrame()->bitmap()); | 145 SkAutoLockPixels lock1(*dragImage->bitmap), lock2(testImage->nativeImage
ForCurrentFrame()->bitmap()); |
| 146 EXPECT_NE(dragImage->bitmap->getPixels(), testImage->nativeImageForCurre
ntFrame()->bitmap().getPixels()); | 146 EXPECT_NE(dragImage->bitmap->getPixels(), testImage->nativeImageForCurre
ntFrame()->bitmap().getPixels()); |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // anonymous namespace | 150 } // anonymous namespace |
| OLD | NEW |