| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "config.h" | 25 #include "config.h" |
| 26 #include "platform/graphics/Image.h" | 26 #include "platform/graphics/Image.h" |
| 27 | 27 |
| 28 #include "platform/graphics/GraphicsLayer.h" | 28 #include "platform/graphics/GraphicsLayer.h" |
| 29 #include "platform/graphics/skia/NativeImageSkia.h" | 29 #include "platform/graphics/skia/NativeImageSkia.h" |
| 30 #include "public/platform/WebImageLayer.h" | 30 #include "public/platform/WebImageLayer.h" |
| 31 #include "wtf/PassOwnPtr.h" | 31 #include "wtf/PassOwnPtr.h" |
| 32 | 32 |
| 33 #include <gtest/gtest.h> | 33 #include <gtest/gtest.h> |
| 34 | 34 |
| 35 using namespace WebCore; | 35 using namespace blink; |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 class MockGraphicsLayerClient : public GraphicsLayerClient { | 39 class MockGraphicsLayerClient : public GraphicsLayerClient { |
| 40 public: | 40 public: |
| 41 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me) OVERRIDE { } | 41 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi
me) OVERRIDE { } |
| 42 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& inClip) OVERRIDE { } | 42 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& inClip) OVERRIDE { } |
| 43 virtual String debugName(const GraphicsLayer*) OVERRIDE { return String(); } | 43 virtual String debugName(const GraphicsLayer*) OVERRIDE { return String(); } |
| 44 }; | 44 }; |
| 45 | 45 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 ASSERT_FALSE(graphicsLayer->contentsLayer()); | 121 ASSERT_FALSE(graphicsLayer->contentsLayer()); |
| 122 | 122 |
| 123 graphicsLayer->setContentsToImage(opaqueImage.get()); | 123 graphicsLayer->setContentsToImage(opaqueImage.get()); |
| 124 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); | 124 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); |
| 125 | 125 |
| 126 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); | 126 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); |
| 127 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); | 127 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace | 130 } // namespace |
| OLD | NEW |