| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/RecordingImageBufferSurface.h" | 5 #include "platform/graphics/RecordingImageBufferSurface.h" |
| 6 | 6 |
| 7 #include "platform/graphics/GraphicsContext.h" | 7 #include "platform/graphics/GraphicsContext.h" |
| 8 #include "platform/graphics/ImageBuffer.h" | 8 #include "platform/graphics/ImageBuffer.h" |
| 9 #include "platform/graphics/ImageBufferClient.h" | 9 #include "platform/graphics/ImageBufferClient.h" |
| 10 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 10 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 m_imageBuffer = ImageBuffer::create(std::move(testSurface)); | 106 m_imageBuffer = ImageBuffer::create(std::move(testSurface)); |
| 107 EXPECT_FALSE(!m_imageBuffer); | 107 EXPECT_FALSE(!m_imageBuffer); |
| 108 m_fakeImageBufferClient = wrapUnique(new FakeImageBufferClient(m_imageBu
ffer.get())); | 108 m_fakeImageBufferClient = wrapUnique(new FakeImageBufferClient(m_imageBu
ffer.get())); |
| 109 m_imageBuffer->setClient(m_fakeImageBufferClient.get()); | 109 m_imageBuffer->setClient(m_fakeImageBufferClient.get()); |
| 110 } | 110 } |
| 111 | 111 |
| 112 public: | 112 public: |
| 113 void testEmptyPicture() | 113 void testEmptyPicture() |
| 114 { | 114 { |
| 115 m_testSurface->initializeCurrentFrame(); | 115 m_testSurface->initializeCurrentFrame(); |
| 116 RefPtr<SkPicture> picture = m_testSurface->getPicture(); | 116 sk_sp<SkPicture> picture = m_testSurface->getPicture(); |
| 117 EXPECT_TRUE((bool)picture.get()); | 117 EXPECT_TRUE((bool)picture.get()); |
| 118 EXPECT_EQ(1, m_fakeImageBufferClient->frameCount()); | 118 EXPECT_EQ(1, m_fakeImageBufferClient->frameCount()); |
| 119 expectDisplayListEnabled(true); | 119 expectDisplayListEnabled(true); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void testNoFallbackWithClear() | 122 void testNoFallbackWithClear() |
| 123 { | 123 { |
| 124 m_testSurface->initializeCurrentFrame(); | 124 m_testSurface->initializeCurrentFrame(); |
| 125 m_testSurface->willOverwriteCanvas(); | 125 m_testSurface->willOverwriteCanvas(); |
| 126 m_testSurface->getPicture(); | 126 m_testSurface->getPicture(); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 expectDisplayListEnabled(true); | 274 expectDisplayListEnabled(true); |
| 275 } | 275 } |
| 276 | 276 |
| 277 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) | 277 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) |
| 278 { | 278 { |
| 279 CALL_TEST_TASK_WRAPPER(testClearRect); | 279 CALL_TEST_TASK_WRAPPER(testClearRect); |
| 280 expectDisplayListEnabled(true); | 280 expectDisplayListEnabled(true); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace blink | 283 } // namespace blink |
| OLD | NEW |