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_impl.h"
9 FakeContentLayerImpl::FakeContentLayerImpl(LayerTreeImpl
* tree_impl
, int id
)
10 : TiledLayerImpl(tree_impl
, id
),
11 lost_output_surface_count_(0),
12 append_quads_count_(0) {
15 FakeContentLayerImpl::~FakeContentLayerImpl() {}
17 scoped_ptr
<LayerImpl
> FakeContentLayerImpl::CreateLayerImpl(
18 LayerTreeImpl
* tree_impl
) {
19 return FakeContentLayerImpl::Create(tree_impl
, id()).PassAs
<LayerImpl
>();
22 bool FakeContentLayerImpl::HaveResourceForTileAt(int i
, int j
) {
23 return HasResourceIdForTileAt(i
, j
);
26 void FakeContentLayerImpl::ReleaseResources() {
27 TiledLayerImpl::ReleaseResources();
28 ++lost_output_surface_count_
;
31 void FakeContentLayerImpl::AppendQuads(QuadSink
* quad_sink
,
32 AppendQuadsData
* append_quads_data
) {
33 TiledLayerImpl::AppendQuads(quad_sink
, append_quads_data
);
34 ++append_quads_count_
;