Home | History | Annotate | Download | only in test
      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 }
     13 
     14 FakeContentLayerImpl::~FakeContentLayerImpl() {}
     15 
     16 scoped_ptr<LayerImpl> FakeContentLayerImpl::CreateLayerImpl(
     17     LayerTreeImpl* tree_impl) {
     18   return FakeContentLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
     19 }
     20 
     21 bool FakeContentLayerImpl::HaveResourceForTileAt(int i, int j) {
     22   return HasResourceIdForTileAt(i, j);
     23 }
     24 
     25 void FakeContentLayerImpl::DidLoseOutputSurface() {
     26   TiledLayerImpl::DidLoseOutputSurface();
     27   ++lost_output_surface_count_;
     28 }
     29 
     30 }  // namespace cc
     31