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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 EXPECT_EQ(1, m_frameBufferRequestCount); | 320 EXPECT_EQ(1, m_frameBufferRequestCount); |
321 EXPECT_EQ(0, m_decodersDestroyed); | 321 EXPECT_EQ(0, m_decodersDestroyed); |
322 ImageDecodingStore::instance()->unlockCache(m_generator.get(), tempImage); | 322 ImageDecodingStore::instance()->unlockCache(m_generator.get(), tempImage); |
323 EXPECT_EQ(2, ImageDecodingStore::instance()->cacheEntries()); | 323 EXPECT_EQ(2, ImageDecodingStore::instance()->cacheEntries()); |
324 EXPECT_EQ(1, ImageDecodingStore::instance()->imageCacheEntries()); | 324 EXPECT_EQ(1, ImageDecodingStore::instance()->imageCacheEntries()); |
325 EXPECT_EQ(1, ImageDecodingStore::instance()->decoderCacheEntries()); | 325 EXPECT_EQ(1, ImageDecodingStore::instance()->decoderCacheEntries()); |
326 | 326 |
327 // Frame can now be decoded completely. | 327 // Frame can now be decoded completely. |
328 setFrameStatus(ImageFrame::FrameComplete); | 328 setFrameStatus(ImageFrame::FrameComplete); |
329 addNewData(); | 329 addNewData(); |
330 OwnPtr<WebKit::WebThread> thread = adoptPtr(WebKit::Platform::current()->cre
ateThread("DecodeThread")); | 330 OwnPtr<blink::WebThread> thread = adoptPtr(blink::Platform::current()->creat
eThread("DecodeThread")); |
331 thread->postTask(new Task(WTF::bind(&decodeThreadMain, m_generator.get()))); | 331 thread->postTask(new Task(WTF::bind(&decodeThreadMain, m_generator.get()))); |
332 thread.clear(); | 332 thread.clear(); |
333 | 333 |
334 EXPECT_EQ(2, m_frameBufferRequestCount); | 334 EXPECT_EQ(2, m_frameBufferRequestCount); |
335 EXPECT_EQ(1, m_decodersDestroyed); | 335 EXPECT_EQ(1, m_decodersDestroyed); |
336 EXPECT_EQ(2, ImageDecodingStore::instance()->cacheEntries()); | 336 EXPECT_EQ(2, ImageDecodingStore::instance()->cacheEntries()); |
337 EXPECT_EQ(2, ImageDecodingStore::instance()->imageCacheEntries()); | 337 EXPECT_EQ(2, ImageDecodingStore::instance()->imageCacheEntries()); |
338 EXPECT_EQ(0, ImageDecodingStore::instance()->decoderCacheEntries()); | 338 EXPECT_EQ(0, ImageDecodingStore::instance()->decoderCacheEntries()); |
339 | 339 |
340 tempImage = m_generator->decodeAndScale(fullSize()); | 340 tempImage = m_generator->decodeAndScale(fullSize()); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 // We have tested failures of all stages. This time all allocations | 460 // We have tested failures of all stages. This time all allocations |
461 // were successful. | 461 // were successful. |
462 EXPECT_TRUE(image); | 462 EXPECT_TRUE(image); |
463 break; | 463 break; |
464 } | 464 } |
465 EXPECT_FALSE(image); | 465 EXPECT_FALSE(image); |
466 } | 466 } |
467 } | 467 } |
468 | 468 |
469 } // namespace WebCore | 469 } // namespace WebCore |
OLD | NEW |