Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / cc / playback / recording_source.h
blobcf8c7c466f58425e423c60f27cb5acf6a1c4b643
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_RECORDING_SOURCE_H_
6 #define CC_PLAYBACK_RECORDING_SOURCE_H_
8 #include "base/memory/ref_counted.h"
9 #include "cc/base/cc_export.h"
10 #include "third_party/skia/include/core/SkColor.h"
11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/geometry/size.h"
14 namespace cc {
15 class ContentLayerClient;
16 class Region;
17 class RasterSource;
19 class CC_EXPORT RecordingSource {
20 public:
21 // TODO(schenney) Remove RECORD_WITH_SK_NULL_CANVAS when we no longer
22 // support a non-Slimming Paint path.
23 enum RecordingMode {
24 RECORD_NORMALLY,
25 RECORD_WITH_SK_NULL_CANVAS,
26 RECORD_WITH_PAINTING_DISABLED,
27 RECORD_WITH_CACHING_DISABLED,
28 RECORD_WITH_CONSTRUCTION_DISABLED,
29 RECORDING_MODE_COUNT, // Must be the last entry.
32 virtual ~RecordingSource() {}
33 // Re-record parts of the picture that are invalid.
34 // Invalidations are in layer space, and will be expanded to cover everything
35 // that was either recorded/changed or that has no recording, leaving out only
36 // pieces that we had a recording for and it was not changed.
37 // Return true iff the pile was modified.
38 virtual bool UpdateAndExpandInvalidation(ContentLayerClient* painter,
39 Region* invalidation,
40 const gfx::Size& layer_size,
41 const gfx::Rect& visible_layer_rect,
42 int frame_number,
43 RecordingMode recording_mode) = 0;
45 virtual scoped_refptr<RasterSource> CreateRasterSource(
46 bool can_use_lcd_text) const = 0;
48 virtual gfx::Size GetSize() const = 0;
49 virtual void SetEmptyBounds() = 0;
50 virtual void SetSlowdownRasterScaleFactor(int factor) = 0;
51 virtual void SetGatherPixelRefs(bool gather_pixel_refs) = 0;
52 virtual void SetBackgroundColor(SkColor background_color) = 0;
53 virtual void SetRequiresClear(bool requires_clear) = 0;
54 virtual bool IsSuitableForGpuRasterization() const = 0;
56 // TODO(hendrikw): Figure out how to remove this.
57 virtual void SetUnsuitableForGpuRasterizationForTesting() = 0;
58 virtual gfx::Size GetTileGridSizeForTesting() const = 0;
61 } // namespace cc
63 #endif // CC_PLAYBACK_RECORDING_SOURCE_H_