Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: Source/platform/graphics/ImageFrameGeneratorTest.cpp

Issue 794223003: Cheaper thread-safe atomic initialization of static references. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add type check for initial value Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/ImageFrameGeneratorTest.cpp
diff --git a/Source/platform/graphics/ImageFrameGeneratorTest.cpp b/Source/platform/graphics/ImageFrameGeneratorTest.cpp
index 129dfd67b79fe0b3fc7545cf0abe28600a5a1a41..12072e8e881196238264ee276c976babff3607c6 100644
--- a/Source/platform/graphics/ImageFrameGeneratorTest.cpp
+++ b/Source/platform/graphics/ImageFrameGeneratorTest.cpp
@@ -52,7 +52,7 @@ class ImageFrameGeneratorTest : public ::testing::Test, public MockImageDecoderC
public:
virtual void SetUp() override
{
- ImageDecodingStore::instance()->setCacheLimitInBytes(1024 * 1024);
+ ImageDecodingStore::instance().setCacheLimitInBytes(1024 * 1024);
m_data = SharedBuffer::create();
m_generator = ImageFrameGenerator::create(fullSize(), m_data, false);
useMockImageDecoderFactory();
@@ -64,7 +64,7 @@ public:
virtual void TearDown() override
{
- ImageDecodingStore::instance()->clear();
+ ImageDecodingStore::instance().clear();
}
virtual void decoderBeingDestroyed() override
@@ -195,10 +195,10 @@ TEST_F(ImageFrameGeneratorTest, frameHasAlpha)
EXPECT_EQ(1, m_frameBufferRequestCount);
ImageDecoder* tempDecoder = 0;
- EXPECT_TRUE(ImageDecodingStore::instance()->lockDecoder(m_generator.get(), fullSize(), &tempDecoder));
+ EXPECT_TRUE(ImageDecodingStore::instance().lockDecoder(m_generator.get(), fullSize(), &tempDecoder));
ASSERT_TRUE(tempDecoder);
static_cast<MockImageDecoder*>(tempDecoder)->setFrameHasAlpha(false);
- ImageDecodingStore::instance()->unlockDecoder(m_generator.get(), tempDecoder);
+ ImageDecodingStore::instance().unlockDecoder(m_generator.get(), tempDecoder);
setFrameStatus(ImageFrame::FrameComplete);
m_generator->decodeAndScale(imageInfo(), 0, buffer, 100 * 4);

Powered by Google App Engine
This is Rietveld 408576698