| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2012 Google Inc. All rights reserved. |    2  * Copyright (C) 2012 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  * |    7  * | 
|    8  * 1.  Redistributions of source code must retain the above copyright |    8  * 1.  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  * 2.  Redistributions in binary form must reproduce the above copyright |   10  * 2.  Redistributions in binary form must reproduce the above copyright | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
|   22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |   22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 
|   23  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |   23  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
|   24  */ |   24  */ | 
|   25  |   25  | 
|   26 #include "config.h" |   26 #include "config.h" | 
|   27  |   27  | 
|   28 #include "core/platform/graphics/chromium/DeferredImageDecoder.h" |   28 #include "core/platform/graphics/chromium/DeferredImageDecoder.h" | 
|   29  |   29  | 
|   30 #include <gtest/gtest.h> |   30 #include <gtest/gtest.h> | 
|   31 #include "MockImageDecoder.h" |   31 #include "MockImageDecoder.h" | 
|   32 #include "NativeImageSkia.h" |  | 
|   33 #include "SkCanvas.h" |   32 #include "SkCanvas.h" | 
|   34 #include "SkDevice.h" |   33 #include "SkDevice.h" | 
|   35 #include "SkPicture.h" |   34 #include "SkPicture.h" | 
|   36 #include "core/platform/SharedBuffer.h" |   35 #include "core/platform/SharedBuffer.h" | 
|   37 #include "core/platform/graphics/chromium/ImageDecodingStore.h" |   36 #include "core/platform/graphics/chromium/ImageDecodingStore.h" | 
 |   37 #include "core/platform/graphics/skia/NativeImageSkia.h" | 
|   38 #include <wtf/PassRefPtr.h> |   38 #include <wtf/PassRefPtr.h> | 
|   39 #include <wtf/RefPtr.h> |   39 #include <wtf/RefPtr.h> | 
|   40 #include <wtf/Threading.h> |   40 #include <wtf/Threading.h> | 
|   41  |   41  | 
|   42 using namespace WebCore; |   42 using namespace WebCore; | 
|   43  |   43  | 
|   44 namespace { |   44 namespace { | 
|   45  |   45  | 
|   46 // Raw data for a PNG file with 1x1 white pixels. |   46 // Raw data for a PNG file with 1x1 white pixels. | 
|   47 const unsigned char whitePNG[] = { |   47 const unsigned char whitePNG[] = { | 
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  194     EXPECT_EQ(0, m_frameBufferRequestCount); |  194     EXPECT_EQ(0, m_frameBufferRequestCount); | 
|  195  |  195  | 
|  196     SkBitmap canvasBitmap; |  196     SkBitmap canvasBitmap; | 
|  197     canvasBitmap.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); |  197     canvasBitmap.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); | 
|  198     ASSERT_TRUE(m_canvas->readPixels(&canvasBitmap, 0, 0)); |  198     ASSERT_TRUE(m_canvas->readPixels(&canvasBitmap, 0, 0)); | 
|  199     SkAutoLockPixels autoLock(canvasBitmap); |  199     SkAutoLockPixels autoLock(canvasBitmap); | 
|  200     EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), canvasBitmap.getColor(0, 0)); |  200     EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), canvasBitmap.getColor(0, 0)); | 
|  201 } |  201 } | 
|  202  |  202  | 
|  203 } // namespace |  203 } // namespace | 
| OLD | NEW |