| 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 #ifndef CC_TEST_TILED_LAYER_TEST_COMMON_H_ | 5 #ifndef CC_TEST_TILED_LAYER_TEST_COMMON_H_ |
| 6 #define CC_TEST_TILED_LAYER_TEST_COMMON_H_ | 6 #define CC_TEST_TILED_LAYER_TEST_COMMON_H_ |
| 7 | 7 |
| 8 #include "cc/layer_updater.h" | 8 #include "cc/layer_updater.h" |
| 9 #include "cc/prioritized_resource.h" | 9 #include "cc/prioritized_resource.h" |
| 10 #include "cc/region.h" | 10 #include "cc/region.h" |
| 11 #include "cc/resource_provider.h" | 11 #include "cc/resource_provider.h" |
| 12 #include "cc/resource_update_queue.h" | 12 #include "cc/resource_update_queue.h" |
| 13 #include "cc/texture_copier.h" | 13 #include "cc/texture_copier.h" |
| 14 #include "cc/texture_uploader.h" | 14 #include "cc/texture_uploader.h" |
| 15 #include "cc/tiled_layer.h" | 15 #include "cc/tiled_layer.h" |
| 16 #include "cc/tiled_layer_impl.h" | 16 #include "cc/tiled_layer_impl.h" |
| 17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 18 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
| 19 | 19 |
| 20 namespace WebKitTests { | 20 namespace cc { |
| 21 | 21 |
| 22 class FakeTiledLayer; | 22 class FakeTiledLayer; |
| 23 | 23 |
| 24 class FakeLayerUpdater : public cc::LayerUpdater { | 24 class FakeLayerUpdater : public cc::LayerUpdater { |
| 25 public: | 25 public: |
| 26 class Resource : public cc::LayerUpdater::Resource { | 26 class Resource : public cc::LayerUpdater::Resource { |
| 27 public: | 27 public: |
| 28 Resource(FakeLayerUpdater*, scoped_ptr<cc::PrioritizedResource>); | 28 Resource(FakeLayerUpdater*, scoped_ptr<cc::PrioritizedResource>); |
| 29 virtual ~Resource(); | 29 virtual ~Resource(); |
| 30 | 30 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 int m_prepareCount; | 64 int m_prepareCount; |
| 65 int m_updateCount; | 65 int m_updateCount; |
| 66 gfx::Rect m_rectToInvalidate; | 66 gfx::Rect m_rectToInvalidate; |
| 67 gfx::Rect m_lastUpdateRect; | 67 gfx::Rect m_lastUpdateRect; |
| 68 gfx::Rect m_opaquePaintRect; | 68 gfx::Rect m_opaquePaintRect; |
| 69 scoped_refptr<FakeTiledLayer> m_layer; | 69 scoped_refptr<FakeTiledLayer> m_layer; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 class FakeTiledLayerImpl : public cc::TiledLayerImpl { | 72 class FakeTiledLayerImpl : public cc::TiledLayerImpl { |
| 73 public: | 73 public: |
| 74 explicit FakeTiledLayerImpl(int id); | 74 FakeTiledLayerImpl(LayerTreeHostImpl* hostImpl, int id); |
| 75 virtual ~FakeTiledLayerImpl(); | 75 virtual ~FakeTiledLayerImpl(); |
| 76 | 76 |
| 77 using cc::TiledLayerImpl::hasTileAt; | 77 using cc::TiledLayerImpl::hasTileAt; |
| 78 using cc::TiledLayerImpl::hasResourceIdForTileAt; | 78 using cc::TiledLayerImpl::hasResourceIdForTileAt; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 class FakeTiledLayer : public cc::TiledLayer { | 81 class FakeTiledLayer : public cc::TiledLayer { |
| 82 public: | 82 public: |
| 83 explicit FakeTiledLayer(cc::PrioritizedResourceManager*); | 83 explicit FakeTiledLayer(cc::PrioritizedResourceManager*); |
| 84 | 84 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 virtual float contentsScaleY() const OVERRIDE; | 120 virtual float contentsScaleY() const OVERRIDE; |
| 121 virtual void setContentsScale(float) OVERRIDE; | 121 virtual void setContentsScale(float) OVERRIDE; |
| 122 | 122 |
| 123 protected: | 123 protected: |
| 124 virtual ~FakeTiledLayerWithScaledBounds(); | 124 virtual ~FakeTiledLayerWithScaledBounds(); |
| 125 gfx::Size m_forcedContentBounds; | 125 gfx::Size m_forcedContentBounds; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 } | 128 } |
| 129 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_ | 129 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_ |
| OLD | NEW |