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"
12 FakeContentLayer::FakeContentLayer(ContentLayerClient
* client
)
13 : ContentLayer(client
),
15 setAnchorPoint(gfx::PointF(0, 0));
16 setBounds(gfx::Size(1, 1));
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
);
35 bool FakeContentLayer::HaveBackingAt(int i
, int j
) {
36 const PrioritizedResource
* resource
= resourceAtForTesting(i
, j
);
37 return resource
&& resource
->haveBackingTexture();