| 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 29 matching lines...) Expand all Loading... |
| 40 bool isDirty() override { return m_isDirty; } | 40 bool isDirty() override { return m_isDirty; } |
| 41 void didFinalizeFrame() override | 41 void didFinalizeFrame() override |
| 42 { | 42 { |
| 43 if (m_isDirty) { | 43 if (m_isDirty) { |
| 44 Platform::current()->currentThread()->removeTaskObserver(this); | 44 Platform::current()->currentThread()->removeTaskObserver(this); |
| 45 m_isDirty = false; | 45 m_isDirty = false; |
| 46 } | 46 } |
| 47 ++m_frameCount; | 47 ++m_frameCount; |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool hasSingleSecurityOrigin() |
| 51 { |
| 52 return true; |
| 53 } |
| 54 |
| 50 // TaskObserver implementation | 55 // TaskObserver implementation |
| 51 void willProcessTask() override { ASSERT_NOT_REACHED(); } | 56 void willProcessTask() override { ASSERT_NOT_REACHED(); } |
| 52 void didProcessTask() override | 57 void didProcessTask() override |
| 53 { | 58 { |
| 54 ASSERT_TRUE(m_isDirty); | 59 ASSERT_TRUE(m_isDirty); |
| 55 FloatRect dirtyRect(0, 0, 1, 1); | 60 FloatRect dirtyRect(0, 0, 1, 1); |
| 56 m_imageBuffer->finalizeFrame(dirtyRect); | 61 m_imageBuffer->finalizeFrame(dirtyRect); |
| 57 ASSERT_FALSE(m_isDirty); | 62 ASSERT_FALSE(m_isDirty); |
| 58 } | 63 } |
| 59 void restoreCanvasMatrixClipStack(SkCanvas*) const override { } | 64 void restoreCanvasMatrixClipStack(SkCanvas*) const override { } |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 } | 392 } |
| 388 | 393 |
| 389 DEFINE_TEST_TASK_WRAPPER_CLASS(testClearRect) | 394 DEFINE_TEST_TASK_WRAPPER_CLASS(testClearRect) |
| 390 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) | 395 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) |
| 391 { | 396 { |
| 392 CALL_TEST_TASK_WRAPPER(testClearRect); | 397 CALL_TEST_TASK_WRAPPER(testClearRect); |
| 393 expectDisplayListEnabled(true); | 398 expectDisplayListEnabled(true); |
| 394 } | 399 } |
| 395 | 400 |
| 396 } // namespace blink | 401 } // namespace blink |
| OLD | NEW |