Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/gpu/DrawingBuffer.h" | 5 #include "platform/graphics/gpu/DrawingBuffer.h" |
| 6 | 6 |
| 7 #include "cc/resources/single_release_callback.h" | 7 #include "cc/resources/single_release_callback.h" |
| 8 #include "cc/resources/texture_mailbox.h" | 8 #include "cc/resources/texture_mailbox.h" |
| 9 #include "gpu/command_buffer/client/gles2_interface_stub.h" | 9 #include "gpu/command_buffer/client/gles2_interface_stub.h" |
| 10 #include "platform/graphics/gpu/DrawingBufferTestHelpers.h" | 10 #include "platform/graphics/gpu/DrawingBufferTestHelpers.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 // These unit tests are separate from DrawingBufferTests.cpp because they are bu ilt | 13 // These unit tests are separate from DrawingBufferTests.cpp because they are |
| 14 // as a part of webkit_unittests instead blink_platform_unittests because the | 14 // built as a part of webkit_unittests instead blink_platform_unittests. This |
|
jbroman
2016/10/04 13:57:20
Super-duper-nit: one space instead of two between
Peter Kasting
2016/10/04 16:10:52
Done.
| |
| 15 // software rendering mode has a dependency on the blink::Platform interface | 15 // is because the software rendering mode has a dependency on the |
| 16 // for buffer allocations. | 16 // blink::Platform interface for buffer allocations. |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 using namespace testing; | 21 using namespace testing; |
| 22 | 22 |
| 23 class WebGraphicsContext3DProviderSoftwareRenderingForTests | 23 class WebGraphicsContext3DProviderSoftwareRenderingForTests |
| 24 : public WebGraphicsContext3DProvider { | 24 : public WebGraphicsContext3DProvider { |
| 25 public: | 25 public: |
| 26 WebGraphicsContext3DProviderSoftwareRenderingForTests( | 26 WebGraphicsContext3DProviderSoftwareRenderingForTests( |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 &releaseCallback3); // cause recycling queue to be purged due to resize | 94 &releaseCallback3); // cause recycling queue to be purged due to resize |
| 95 EXPECT_EQ(0, m_drawingBuffer->recycledBitmapCount()); | 95 EXPECT_EQ(0, m_drawingBuffer->recycledBitmapCount()); |
| 96 releaseCallback3->Run(gpu::SyncToken(), false /* lostResource */); | 96 releaseCallback3->Run(gpu::SyncToken(), false /* lostResource */); |
| 97 EXPECT_EQ(1, m_drawingBuffer->recycledBitmapCount()); | 97 EXPECT_EQ(1, m_drawingBuffer->recycledBitmapCount()); |
| 98 | 98 |
| 99 m_drawingBuffer->beginDestruction(); | 99 m_drawingBuffer->beginDestruction(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 } // unnamed namespace | 102 } // unnamed namespace |
| 103 } // blink | 103 } // blink |
| OLD | NEW |