Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: cc/test/fake_picture_layer.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/fake_picture_layer.h ('k') | cc/test/fake_picture_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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_picture_layer.h"
6
7 #include "cc/test/fake_picture_layer_impl.h"
8
9 namespace cc {
10
11 FakePictureLayer::FakePictureLayer(ContentLayerClient* client)
12 : PictureLayer(client),
13 update_count_(0),
14 push_properties_count_(0),
15 output_surface_created_count_(0),
16 always_update_resources_(false),
17 disable_lcd_text_(false) {
18 SetBounds(gfx::Size(1, 1));
19 SetIsDrawable(true);
20 }
21
22 FakePictureLayer::FakePictureLayer(ContentLayerClient* client,
23 scoped_ptr<RecordingSource> source)
24 : PictureLayer(client, source.Pass()),
25 update_count_(0),
26 push_properties_count_(0),
27 output_surface_created_count_(0),
28 always_update_resources_(false),
29 disable_lcd_text_(false) {
30 SetBounds(gfx::Size(1, 1));
31 SetIsDrawable(true);
32 }
33
34 FakePictureLayer::~FakePictureLayer() {}
35
36 scoped_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl(
37 LayerTreeImpl* tree_impl) {
38 return FakePictureLayerImpl::Create(tree_impl, layer_id_);
39 }
40
41 bool FakePictureLayer::Update(ResourceUpdateQueue* queue,
42 const OcclusionTracker<Layer>* occlusion) {
43 if (disable_lcd_text_)
44 draw_properties().can_use_lcd_text = false;
45 bool updated = PictureLayer::Update(queue, occlusion);
46 update_count_++;
47 return updated || always_update_resources_;
48 }
49
50 void FakePictureLayer::PushPropertiesTo(LayerImpl* layer) {
51 PictureLayer::PushPropertiesTo(layer);
52 push_properties_count_++;
53 }
54
55 void FakePictureLayer::OnOutputSurfaceCreated() {
56 PictureLayer::OnOutputSurfaceCreated();
57 output_surface_created_count_++;
58 }
59
60 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer.h ('k') | cc/test/fake_picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698