fake_picture_layer.cc revision 90dce4d38c5ff5333bea97d859d4e484e27edf0c
190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// Copyright 2012 The Chromium Authors. All rights reserved. 290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// found in the LICENSE file. 490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "cc/test/fake_picture_layer.h" 690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "cc/test/fake_picture_layer_impl.h" 890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)namespace cc { 1090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 1190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)FakePictureLayer::FakePictureLayer(ContentLayerClient* client) 1290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) : PictureLayer(client), 1390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) update_count_(0) { 1490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) SetAnchorPoint(gfx::PointF(0.f, 0.f)); 1590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) SetBounds(gfx::Size(1, 1)); 1690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) SetIsDrawable(true); 1790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)} 1890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 1990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)FakePictureLayer::~FakePictureLayer() {} 2090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 2190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)scoped_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl( 2290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) LayerTreeImpl* tree_impl) { 2390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) return FakePictureLayerImpl::Create(tree_impl, layer_id_).PassAs<LayerImpl>(); 2490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)} 2590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 2690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)void FakePictureLayer::Update(ResourceUpdateQueue* queue, 2790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) const OcclusionTracker* occlusion, 2890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) RenderingStats* stats) { 2990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) PictureLayer::Update(queue, occlusion, stats); 3090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) update_count_++; 3190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)} 3290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 3390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)} // namespace cc 34