- add sources.
[platform/framework/web/crosswalk.git] / src / cc / test / fake_content_layer_impl.cc
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.
4
5 #include "cc/test/fake_content_layer_impl.h"
6
7 namespace cc {
8
9 FakeContentLayerImpl::FakeContentLayerImpl(LayerTreeImpl* tree_impl, int id)
10     : TiledLayerImpl(tree_impl, id),
11       lost_output_surface_count_(0),
12       append_quads_count_(0) {
13 }
14
15 FakeContentLayerImpl::~FakeContentLayerImpl() {}
16
17 scoped_ptr<LayerImpl> FakeContentLayerImpl::CreateLayerImpl(
18     LayerTreeImpl* tree_impl) {
19   return FakeContentLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
20 }
21
22 bool FakeContentLayerImpl::HaveResourceForTileAt(int i, int j) {
23   return HasResourceIdForTileAt(i, j);
24 }
25
26 void FakeContentLayerImpl::DidLoseOutputSurface() {
27   TiledLayerImpl::DidLoseOutputSurface();
28   ++lost_output_surface_count_;
29 }
30
31 void FakeContentLayerImpl::AppendQuads(QuadSink* quad_sink,
32     AppendQuadsData* append_quads_data) {
33   TiledLayerImpl::AppendQuads(quad_sink, append_quads_data);
34   ++append_quads_count_;
35 }
36
37
38 }  // namespace cc