OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "CCResourceProvider.h" | 7 #include "CCResourceProvider.h" |
8 | 8 |
9 #include "CCGraphicsContext.h" | 9 #include "CCGraphicsContext.h" |
10 #include "CCSingleThreadProxy.h" // For DebugScopedSetImplThread | 10 #include "CCSingleThreadProxy.h" // For DebugScopedSetImplThread |
11 #include "CompositorFakeWebGraphicsContext3D.h" | 11 #include "CompositorFakeWebGraphicsContext3D.h" |
12 #include "Extensions3DChromium.h" | 12 #include "Extensions3DChromium.h" |
13 #include "FakeWebCompositorOutputSurface.h" | 13 #include "FakeWebCompositorOutputSurface.h" |
14 #include <gtest/gtest.h> | 14 #include <gtest/gtest.h> |
15 #include <public/WebGraphicsContext3D.h> | 15 #include <public/WebGraphicsContext3D.h> |
16 #include <wtf/HashMap.h> | 16 #include <wtf/HashMap.h> |
17 #include <wtf/OwnArrayPtr.h> | 17 #include <wtf/OwnArrayPtr.h> |
18 #include <wtf/OwnPtr.h> | 18 #include <wtf/OwnPtr.h> |
19 | 19 |
20 using namespace WebCore; | 20 using namespace cc; |
21 using namespace WebKit; | 21 using namespace WebKit; |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 size_t textureSize(const IntSize& size, WGC3Denum format) | 25 size_t textureSize(const IntSize& size, WGC3Denum format) |
26 { | 26 { |
27 unsigned int componentsPerPixel = 4; | 27 unsigned int componentsPerPixel = 4; |
28 unsigned int bytesPerComponent = 1; | 28 unsigned int bytesPerComponent = 1; |
29 return size.width() * size.height() * componentsPerPixel * bytesPerComponent
; | 29 return size.width() * size.height() * componentsPerPixel * bytesPerComponent
; |
30 } | 30 } |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 EXPECT_EQ(0u, m_resourceProvider->numResources()); | 526 EXPECT_EQ(0u, m_resourceProvider->numResources()); |
527 EXPECT_EQ(0u, m_resourceProvider->mailboxCount()); | 527 EXPECT_EQ(0u, m_resourceProvider->mailboxCount()); |
528 } | 528 } |
529 | 529 |
530 INSTANTIATE_TEST_CASE_P(CCResourceProviderTests, | 530 INSTANTIATE_TEST_CASE_P(CCResourceProviderTests, |
531 CCResourceProviderTest, | 531 CCResourceProviderTest, |
532 ::testing::Values(CCResourceProvider::GLTexture, | 532 ::testing::Values(CCResourceProvider::GLTexture, |
533 CCResourceProvider::Bitmap)); | 533 CCResourceProvider::Bitmap)); |
534 | 534 |
535 } // namespace | 535 } // namespace |
OLD | NEW |