| 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 "CCTiledLayerTestCommon.h" | 7 #include "CCTiledLayerTestCommon.h" |
| 8 | 8 |
| 9 using namespace cc; | 9 using namespace cc; |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 resultingOpaqueRect = m_opaquePaintRect; | 53 resultingOpaqueRect = m_opaquePaintRect; |
| 54 } | 54 } |
| 55 | 55 |
| 56 void FakeLayerTextureUpdater::setRectToInvalidate(const IntRect& rect, FakeTiled
LayerChromium* layer) | 56 void FakeLayerTextureUpdater::setRectToInvalidate(const IntRect& rect, FakeTiled
LayerChromium* layer) |
| 57 { | 57 { |
| 58 m_rectToInvalidate = rect; | 58 m_rectToInvalidate = rect; |
| 59 m_layer = layer; | 59 m_layer = layer; |
| 60 } | 60 } |
| 61 | 61 |
| 62 PassOwnPtr<LayerTextureUpdater::Texture> FakeLayerTextureUpdater::createTexture(
CCPrioritizedTextureManager* manager) | 62 scoped_ptr<LayerTextureUpdater::Texture> FakeLayerTextureUpdater::createTexture(
CCPrioritizedTextureManager* manager) |
| 63 { | 63 { |
| 64 return adoptPtr(new Texture(this, CCPrioritizedTexture::create(manager))); | 64 return scoped_ptr<LayerTextureUpdater::Texture>(new Texture(this, CCPrioriti
zedTexture::create(manager))); |
| 65 } | 65 } |
| 66 | 66 |
| 67 LayerTextureUpdater::SampledTexelFormat FakeLayerTextureUpdater::sampledTexelFor
mat(GC3Denum) | 67 LayerTextureUpdater::SampledTexelFormat FakeLayerTextureUpdater::sampledTexelFor
mat(GC3Denum) |
| 68 { | 68 { |
| 69 return SampledTexelFormatRGBA; | 69 return SampledTexelFormatRGBA; |
| 70 } | 70 } |
| 71 | 71 |
| 72 FakeCCTiledLayerImpl::FakeCCTiledLayerImpl(int id) | 72 FakeCCTiledLayerImpl::FakeCCTiledLayerImpl(int id) |
| 73 : CCTiledLayerImpl(id) | 73 : CCTiledLayerImpl(id) |
| 74 { | 74 { |
| 75 } | 75 } |
| 76 | 76 |
| 77 FakeCCTiledLayerImpl::~FakeCCTiledLayerImpl() | 77 FakeCCTiledLayerImpl::~FakeCCTiledLayerImpl() |
| 78 { | 78 { |
| 79 } | 79 } |
| 80 | 80 |
| 81 FakeTiledLayerChromium::FakeTiledLayerChromium(CCPrioritizedTextureManager* text
ureManager) | 81 FakeTiledLayerChromium::FakeTiledLayerChromium(CCPrioritizedTextureManager* text
ureManager) |
| 82 : TiledLayerChromium() | 82 : TiledLayerChromium() |
| 83 , m_fakeTextureUpdater(adoptRef(new FakeLayerTextureUpdater)) | 83 , m_fakeTextureUpdater(make_scoped_refptr(new FakeLayerTextureUpdater)) |
| 84 , m_textureManager(textureManager) | 84 , m_textureManager(textureManager) |
| 85 { | 85 { |
| 86 setTileSize(tileSize()); | 86 setTileSize(tileSize()); |
| 87 setTextureFormat(GraphicsContext3D::RGBA); | 87 setTextureFormat(GraphicsContext3D::RGBA); |
| 88 setBorderTexelOption(CCLayerTilingData::NoBorderTexels); | 88 setBorderTexelOption(CCLayerTilingData::NoBorderTexels); |
| 89 setIsDrawable(true); // So that we don't get false positives if any of these
tests expect to return false from drawsContent() for other reasons. | 89 setIsDrawable(true); // So that we don't get false positives if any of these
tests expect to return false from drawsContent() for other reasons. |
| 90 } | 90 } |
| 91 | 91 |
| 92 FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds(CCPrioritizedText
ureManager* textureManager) | 92 FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds(CCPrioritizedText
ureManager* textureManager) |
| 93 : FakeTiledLayerChromium(textureManager) | 93 : FakeTiledLayerChromium(textureManager) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 { | 153 { |
| 154 upload.texture->acquireBackingTexture(resourceProvider); | 154 upload.texture->acquireBackingTexture(resourceProvider); |
| 155 } | 155 } |
| 156 | 156 |
| 157 double FakeTextureUploader::estimatedTexturesPerSecond() | 157 double FakeTextureUploader::estimatedTexturesPerSecond() |
| 158 { | 158 { |
| 159 return std::numeric_limits<double>::max(); | 159 return std::numeric_limits<double>::max(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace | 162 } // namespace |
| OLD | NEW |