Revert "Merged all Chromoting Host code into remoting_core.dll (Windows)."
[chromium-blink-merge.git] / cc / test / fake_content_layer.cc
blobc103b2403e1d621c990773e1fd79e37ddbba5f8b
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
3 // found in the LICENSE file.
5 #include "cc/test/fake_content_layer.h"
7 #include "cc/prioritized_resource.h"
8 #include "cc/test/fake_content_layer_impl.h"
10 namespace cc {
12 FakeContentLayer::FakeContentLayer(ContentLayerClient* client)
13 : ContentLayer(client),
14 update_count_(0) {
15 setAnchorPoint(gfx::PointF(0, 0));
16 setBounds(gfx::Size(1, 1));
17 setIsDrawable(true);
20 FakeContentLayer::~FakeContentLayer() {}
22 scoped_ptr<LayerImpl> FakeContentLayer::createLayerImpl(
23 LayerTreeImpl* tree_impl) {
24 return FakeContentLayerImpl::Create(tree_impl, m_layerId).PassAs<LayerImpl>();
27 void FakeContentLayer::update(
28 ResourceUpdateQueue& queue,
29 const OcclusionTracker* occlusion,
30 RenderingStats& stats) {
31 ContentLayer::update(queue, occlusion, stats);
32 update_count_++;
35 bool FakeContentLayer::HaveBackingAt(int i, int j) {
36 const PrioritizedResource* resource = resourceAtForTesting(i, j);
37 return resource && resource->haveBackingTexture();
40 } // namespace cc