BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / cc / test / fake_picture_layer.cc
blob05706257b694971e9d33849063d7f9053222dcf1
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_picture_layer.h"
7 #include "cc/test/fake_picture_layer_impl.h"
9 namespace cc {
11 FakePictureLayer::FakePictureLayer(const LayerSettings& settings,
12 ContentLayerClient* client)
13 : PictureLayer(settings, client),
14 update_count_(0),
15 push_properties_count_(0),
16 always_update_resources_(false) {
17 SetBounds(gfx::Size(1, 1));
18 SetIsDrawable(true);
21 FakePictureLayer::FakePictureLayer(const LayerSettings& settings,
22 ContentLayerClient* client,
23 scoped_ptr<RecordingSource> source)
24 : PictureLayer(settings, client, source.Pass()),
25 update_count_(0),
26 push_properties_count_(0),
27 always_update_resources_(false) {
28 SetBounds(gfx::Size(1, 1));
29 SetIsDrawable(true);
32 FakePictureLayer::~FakePictureLayer() {}
34 scoped_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl(
35 LayerTreeImpl* tree_impl) {
36 if (is_mask())
37 return FakePictureLayerImpl::CreateMask(tree_impl, layer_id_);
38 return FakePictureLayerImpl::Create(tree_impl, layer_id_);
41 bool FakePictureLayer::Update() {
42 bool updated = PictureLayer::Update();
43 update_count_++;
44 return updated || always_update_resources_;
47 void FakePictureLayer::PushPropertiesTo(LayerImpl* layer) {
48 PictureLayer::PushPropertiesTo(layer);
49 push_properties_count_++;
52 } // namespace cc