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/resources/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.f
, 0.f
));
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
, layer_id_
).PassAs
<LayerImpl
>();
27 void FakeContentLayer::Update(ResourceUpdateQueue
* queue
,
28 const OcclusionTracker
* occlusion
,
29 RenderingStats
* stats
) {
30 ContentLayer::Update(queue
, occlusion
, stats
);
34 bool FakeContentLayer::HaveBackingAt(int i
, int j
) {
35 const PrioritizedResource
* resource
= ResourceAtForTesting(i
, j
);
36 return resource
&& resource
->have_backing_texture();