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

Side by Side Diff: cc/resources/recording_source.h

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/resources/rasterizer.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_RESOURCES_RECORDING_SOURCE_H_ 5 #ifndef CC_RESOURCES_RECORDING_SOURCE_H_
6 #define CC_RESOURCES_RECORDING_SOURCE_H_ 6 #define CC_RESOURCES_RECORDING_SOURCE_H_
7 7
8 #include "base/memory/ref_counted.h"
8 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
9 #include "cc/resources/picture.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
11 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
13 13
14 namespace cc { 14 namespace cc {
15 class ContentLayerClient; 15 class ContentLayerClient;
16 class Region; 16 class Region;
17 class RasterSource; 17 class RasterSource;
18 18
19 class CC_EXPORT RecordingSource { 19 class CC_EXPORT RecordingSource {
20 public: 20 public:
21 enum RecordingMode {
22 RECORD_NORMALLY,
23 RECORD_WITH_SK_NULL_CANVAS,
24 RECORD_WITH_PAINTING_DISABLED,
25 RECORD_WITH_CACHING_DISABLED,
26 RECORDING_MODE_COUNT, // Must be the last entry.
27 };
28
21 virtual ~RecordingSource() {} 29 virtual ~RecordingSource() {}
22 // Re-record parts of the picture that are invalid. 30 // Re-record parts of the picture that are invalid.
23 // Invalidations are in layer space, and will be expanded to cover everything 31 // Invalidations are in layer space, and will be expanded to cover everything
24 // that was either recorded/changed or that has no recording, leaving out only 32 // that was either recorded/changed or that has no recording, leaving out only
25 // pieces that we had a recording for and it was not changed. 33 // pieces that we had a recording for and it was not changed.
26 // Return true iff the pile was modified. 34 // Return true iff the pile was modified.
27 virtual bool UpdateAndExpandInvalidation( 35 virtual bool UpdateAndExpandInvalidation(ContentLayerClient* painter,
28 ContentLayerClient* painter, 36 Region* invalidation,
29 Region* invalidation, 37 bool can_use_lcd_text,
30 bool can_use_lcd_text, 38 const gfx::Size& layer_size,
31 const gfx::Size& layer_size, 39 const gfx::Rect& visible_layer_rect,
32 const gfx::Rect& visible_layer_rect, 40 int frame_number,
33 int frame_number, 41 RecordingMode recording_mode) = 0;
34 Picture::RecordingMode recording_mode) = 0;
35 42
36 virtual scoped_refptr<RasterSource> CreateRasterSource() const = 0; 43 virtual scoped_refptr<RasterSource> CreateRasterSource() const = 0;
37 44
38 virtual gfx::Size GetSize() const = 0; 45 virtual gfx::Size GetSize() const = 0;
39 virtual void SetEmptyBounds() = 0; 46 virtual void SetEmptyBounds() = 0;
40 virtual void SetSlowdownRasterScaleFactor(int factor) = 0; 47 virtual void SetSlowdownRasterScaleFactor(int factor) = 0;
41 virtual bool IsSuitableForGpuRasterization() const = 0; 48 virtual bool IsSuitableForGpuRasterization() const = 0;
42 49
43 // TODO(hendrikw): Figure out how to remove this. 50 // TODO(hendrikw): Figure out how to remove this.
44 virtual void SetUnsuitableForGpuRasterizationForTesting() = 0; 51 virtual void SetUnsuitableForGpuRasterizationForTesting() = 0;
45 virtual gfx::Size GetTileGridSizeForTesting() const = 0; 52 virtual gfx::Size GetTileGridSizeForTesting() const = 0;
46 }; 53 };
47 54
48 } // namespace cc 55 } // namespace cc
49 56
50 #endif // CC_RESOURCES_RECORDING_SOURCE_H_ 57 #endif // CC_RESOURCES_RECORDING_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/resources/rasterizer.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698