Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4477)

Unified Diff: cc/test/CCTiledLayerTestCommon.cpp

Issue 11108020: [cc] Change cc_tests.gyp filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/CCTiledLayerTestCommon.h ('k') | cc/test/CompositorFakeWebGraphicsContext3D.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/CCTiledLayerTestCommon.cpp
diff --git a/cc/test/CCTiledLayerTestCommon.cpp b/cc/test/CCTiledLayerTestCommon.cpp
deleted file mode 100644
index bf528ca0281cfcc1743c04308b9e315824496380..0000000000000000000000000000000000000000
--- a/cc/test/CCTiledLayerTestCommon.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-
-#include "CCTiledLayerTestCommon.h"
-
-using namespace cc;
-
-namespace WebKitTests {
-
-FakeLayerTextureUpdater::Texture::Texture(FakeLayerTextureUpdater* layer, scoped_ptr<CCPrioritizedTexture> texture)
- : LayerTextureUpdater::Texture(texture.Pass())
- , m_layer(layer)
-{
-}
-
-FakeLayerTextureUpdater::Texture::~Texture()
-{
-}
-
-void FakeLayerTextureUpdater::Texture::updateRect(CCResourceProvider* resourceProvider, const IntRect&, const IntSize&)
-{
- texture()->acquireBackingTexture(resourceProvider);
- m_layer->updateRect();
-}
-
-void FakeLayerTextureUpdater::Texture::prepareRect(const IntRect&, cc::CCRenderingStats&)
-{
- m_layer->prepareRect();
-}
-
-FakeLayerTextureUpdater::FakeLayerTextureUpdater()
- : m_prepareCount(0)
- , m_updateCount(0)
- , m_prepareRectCount(0)
-{
-}
-
-FakeLayerTextureUpdater::~FakeLayerTextureUpdater()
-{
-}
-
-void FakeLayerTextureUpdater::prepareToUpdate(const IntRect& contentRect, const IntSize&, float, float, IntRect& resultingOpaqueRect, CCRenderingStats&)
-{
- m_prepareCount++;
- m_lastUpdateRect = contentRect;
- if (!m_rectToInvalidate.isEmpty()) {
- m_layer->invalidateContentRect(m_rectToInvalidate);
- m_rectToInvalidate = IntRect();
- m_layer = NULL;
- }
- resultingOpaqueRect = m_opaquePaintRect;
-}
-
-void FakeLayerTextureUpdater::setRectToInvalidate(const IntRect& rect, FakeTiledLayerChromium* layer)
-{
- m_rectToInvalidate = rect;
- m_layer = layer;
-}
-
-PassOwnPtr<LayerTextureUpdater::Texture> FakeLayerTextureUpdater::createTexture(CCPrioritizedTextureManager* manager)
-{
- return adoptPtr(new Texture(this, CCPrioritizedTexture::create(manager)));
-}
-
-LayerTextureUpdater::SampledTexelFormat FakeLayerTextureUpdater::sampledTexelFormat(GC3Denum)
-{
- return SampledTexelFormatRGBA;
-}
-
-FakeCCTiledLayerImpl::FakeCCTiledLayerImpl(int id)
- : CCTiledLayerImpl(id)
-{
-}
-
-FakeCCTiledLayerImpl::~FakeCCTiledLayerImpl()
-{
-}
-
-FakeTiledLayerChromium::FakeTiledLayerChromium(CCPrioritizedTextureManager* textureManager)
- : TiledLayerChromium()
- , m_fakeTextureUpdater(adoptRef(new FakeLayerTextureUpdater))
- , m_textureManager(textureManager)
-{
- setTileSize(tileSize());
- setTextureFormat(GraphicsContext3D::RGBA);
- setBorderTexelOption(CCLayerTilingData::NoBorderTexels);
- setIsDrawable(true); // So that we don't get false positives if any of these tests expect to return false from drawsContent() for other reasons.
-}
-
-FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds(CCPrioritizedTextureManager* textureManager)
- : FakeTiledLayerChromium(textureManager)
-{
-}
-
-FakeTiledLayerWithScaledBounds::~FakeTiledLayerWithScaledBounds()
-{
-}
-
-FakeTiledLayerChromium::~FakeTiledLayerChromium()
-{
-}
-
-void FakeTiledLayerChromium::setNeedsDisplayRect(const FloatRect& rect)
-{
- m_lastNeedsDisplayRect = rect;
- TiledLayerChromium::setNeedsDisplayRect(rect);
-}
-
-void FakeTiledLayerChromium::setTexturePriorities(const CCPriorityCalculator& calculator)
-{
- // Ensure there is always a target render surface available. If none has been
- // set (the layer is an orphan for the test), then just set a surface on itself.
- bool missingTargetRenderSurface = !renderTarget();
-
- if (missingTargetRenderSurface)
- createRenderSurface();
-
- TiledLayerChromium::setTexturePriorities(calculator);
-
- if (missingTargetRenderSurface) {
- clearRenderSurface();
- setRenderTarget(0);
- }
-}
-
-cc::CCPrioritizedTextureManager* FakeTiledLayerChromium::textureManager() const
-{
- return m_textureManager;
-}
-
-cc::LayerTextureUpdater* FakeTiledLayerChromium::textureUpdater() const
-{
- return m_fakeTextureUpdater.get();
-}
-
-cc::IntSize FakeTiledLayerWithScaledBounds::contentBounds() const
-{
- return m_forcedContentBounds;
-}
-
-size_t FakeTextureUploader::numBlockingUploads()
-{
- return 0;
-}
-
-void FakeTextureUploader::markPendingUploadsAsNonBlocking()
-{
-}
-
-void FakeTextureUploader::uploadTexture(cc::CCResourceProvider* resourceProvider, Parameters upload)
-{
- upload.texture->updateRect(resourceProvider, upload.sourceRect, upload.destOffset);
-}
-
-double FakeTextureUploader::estimatedTexturesPerSecond()
-{
- return std::numeric_limits<double>::max();
-}
-
-} // namespace
« no previous file with comments | « cc/test/CCTiledLayerTestCommon.h ('k') | cc/test/CompositorFakeWebGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698