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

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

Issue 2141233002: cc: Clean up RecordingSource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test code refactor Created 4 years, 4 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_FAKE_PICTURE_LAYER_H_ 5 #ifndef CC_TEST_FAKE_PICTURE_LAYER_H_
6 #define CC_TEST_FAKE_PICTURE_LAYER_H_ 6 #define CC_TEST_FAKE_PICTURE_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 24 matching lines...) Expand all
35 void reset_push_properties_count() { push_properties_count_ = 0; } 35 void reset_push_properties_count() { push_properties_count_ = 0; }
36 36
37 void set_always_update_resources(bool always_update_resources) { 37 void set_always_update_resources(bool always_update_resources) {
38 always_update_resources_ = always_update_resources; 38 always_update_resources_ = always_update_resources;
39 } 39 }
40 40
41 bool Update() override; 41 bool Update() override;
42 42
43 void PushPropertiesTo(LayerImpl* layer) override; 43 void PushPropertiesTo(LayerImpl* layer) override;
44 44
45 void SetRecordedViewport(const gfx::Rect& recorded_viewport) {
vmpstr 2016/07/27 18:18:37 can you make these hacker_case instead of CamelCas
Menglin 2016/07/27 19:17:48 you mean SetRecordedViewport and SetForceUnsuitabl
vmpstr 2016/07/28 18:19:58 I mean if the function is inlined and it's a fake
Menglin 2016/07/29 23:50:14 Done.
46 inputs_.recorded_viewport = recorded_viewport;
47 }
48
49 DisplayItemList* display_list() const { return inputs_.display_list.get(); }
50
51 void SetForceUnsuitableForGpuRasterization(bool flag) {
52 force_unsuitable_for_gpu_rasterization_ = flag;
53 }
54
55 bool IsSuitableForGpuRasterization() const override;
56
45 private: 57 private:
46 explicit FakePictureLayer(ContentLayerClient* client); 58 explicit FakePictureLayer(ContentLayerClient* client);
47 FakePictureLayer(ContentLayerClient* client, 59 FakePictureLayer(ContentLayerClient* client,
48 std::unique_ptr<RecordingSource> source); 60 std::unique_ptr<RecordingSource> source);
49 ~FakePictureLayer() override; 61 ~FakePictureLayer() override;
50 62
51 int update_count_; 63 int update_count_;
52 size_t push_properties_count_; 64 size_t push_properties_count_;
53 bool always_update_resources_; 65 bool always_update_resources_;
66
67 bool force_unsuitable_for_gpu_rasterization_;
54 }; 68 };
55 69
56 } // namespace cc 70 } // namespace cc
57 71
58 #endif // CC_TEST_FAKE_PICTURE_LAYER_H_ 72 #endif // CC_TEST_FAKE_PICTURE_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698