Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / cc / playback / display_list_recording_source.h
blob8d652fa67defd5c2ab84d85db8e43c0a5630befa
1 // Copyright 2014 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 #ifndef CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_
6 #define CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/playback/recording_source.h"
11 namespace cc {
12 class DisplayItemList;
13 class DisplayListRasterSource;
15 class CC_EXPORT DisplayListRecordingSource : public RecordingSource {
16 public:
17 DisplayListRecordingSource(const gfx::Size& grid_cell_size,
18 bool use_cached_picture);
19 ~DisplayListRecordingSource() override;
21 // RecordingSource overrides.
22 bool UpdateAndExpandInvalidation(ContentLayerClient* painter,
23 Region* invalidation,
24 const gfx::Size& layer_size,
25 const gfx::Rect& visible_layer_rect,
26 int frame_number,
27 RecordingMode recording_mode) override;
28 scoped_refptr<RasterSource> CreateRasterSource(
29 bool can_use_lcd_text) const override;
30 gfx::Size GetSize() const final;
31 void SetEmptyBounds() override;
32 void SetSlowdownRasterScaleFactor(int factor) override;
33 void SetGatherPixelRefs(bool gather_pixel_refs) override;
34 void SetBackgroundColor(SkColor background_color) override;
35 void SetRequiresClear(bool requires_clear) override;
36 bool IsSuitableForGpuRasterization() const override;
37 void SetUnsuitableForGpuRasterizationForTesting() override;
38 gfx::Size GetTileGridSizeForTesting() const override;
40 protected:
41 void Clear();
43 const bool use_cached_picture_;
45 gfx::Rect recorded_viewport_;
46 gfx::Size size_;
47 int slow_down_raster_scale_factor_for_debug_;
48 bool gather_pixel_refs_;
49 bool requires_clear_;
50 bool is_solid_color_;
51 SkColor solid_color_;
52 SkColor background_color_;
53 int pixel_record_distance_;
54 gfx::Size grid_cell_size_;
56 scoped_refptr<DisplayItemList> display_list_;
58 private:
59 friend class DisplayListRasterSource;
61 void DetermineIfSolidColor();
63 bool is_suitable_for_gpu_rasterization_;
65 DISALLOW_COPY_AND_ASSIGN(DisplayListRecordingSource);
68 } // namespace cc
70 #endif // CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_