OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "TiledLayerChromium.h" | 7 #include "TiledLayerChromium.h" |
8 | 8 |
9 #include "BitmapCanvasLayerTextureUpdater.h" | 9 #include "BitmapCanvasLayerTextureUpdater.h" |
10 #include "CCAnimationTestCommon.h" | 10 #include "CCAnimationTestCommon.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 class TiledLayerChromiumTest : public testing::Test { | 50 class TiledLayerChromiumTest : public testing::Test { |
51 public: | 51 public: |
52 TiledLayerChromiumTest() | 52 TiledLayerChromiumTest() |
53 : m_compositorInitializer(0) | 53 : m_compositorInitializer(0) |
54 , m_context(WebKit::createFakeCCGraphicsContext()) | 54 , m_context(WebKit::createFakeCCGraphicsContext()) |
55 , m_textureManager(CCPrioritizedTextureManager::create(60*1024*1024, 102
4, CCRenderer::ContentPool)) | 55 , m_textureManager(CCPrioritizedTextureManager::create(60*1024*1024, 102
4, CCRenderer::ContentPool)) |
56 , m_occlusion(0) | 56 , m_occlusion(0) |
57 { | 57 { |
58 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked; | 58 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked; |
59 m_resourceProvider = CCResourceProvider::create(m_context.get(), Unthrot
tledUploader); | 59 m_resourceProvider = CCResourceProvider::create(m_context.get()); |
60 } | 60 } |
61 | 61 |
62 virtual ~TiledLayerChromiumTest() | 62 virtual ~TiledLayerChromiumTest() |
63 { | 63 { |
64 textureManagerClearAllMemory(m_textureManager.get(), m_resourceProvider.
get()); | 64 textureManagerClearAllMemory(m_textureManager.get(), m_resourceProvider.
get()); |
65 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked; | 65 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked; |
66 m_resourceProvider.clear(); | 66 m_resourceProvider.clear(); |
67 } | 67 } |
68 | 68 |
69 // Helper classes and functions that set the current thread to be the impl t
hread | 69 // Helper classes and functions that set the current thread to be the impl t
hread |
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 updateTextures(); | 1538 updateTextures(); |
1539 | 1539 |
1540 // Invalidate the entire layer in layer space. When painting, the rect given
to webkit should match the layer's bounds. | 1540 // Invalidate the entire layer in layer space. When painting, the rect given
to webkit should match the layer's bounds. |
1541 layer->setNeedsDisplayRect(layerRect); | 1541 layer->setNeedsDisplayRect(layerRect); |
1542 layer->update(m_queue, 0, m_stats); | 1542 layer->update(m_queue, 0, m_stats); |
1543 | 1543 |
1544 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); | 1544 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); |
1545 } | 1545 } |
1546 | 1546 |
1547 } // namespace | 1547 } // namespace |
OLD | NEW |