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

Side by Side Diff: cc/playback/display_list_raster_source.h

Issue 1799883002: cc: Refactor SkipImageCanvas and create it during playback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 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_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ 5 #ifndef CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
6 #define CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ 6 #define CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 30 matching lines...) Expand all
41 // It is assumed that the canvas passed here will only be rasterized by 41 // It is assumed that the canvas passed here will only be rasterized by
42 // this raster source via this call. 42 // this raster source via this call.
43 // 43 //
44 // Virtual for testing. 44 // Virtual for testing.
45 // 45 //
46 // Note that this should only be called after the image decode controller has 46 // Note that this should only be called after the image decode controller has
47 // been set, which happens during commit. 47 // been set, which happens during commit.
48 virtual void PlaybackToCanvas(SkCanvas* canvas, 48 virtual void PlaybackToCanvas(SkCanvas* canvas,
49 const gfx::Rect& canvas_bitmap_rect, 49 const gfx::Rect& canvas_bitmap_rect,
50 const gfx::Rect& canvas_playback_rect, 50 const gfx::Rect& canvas_playback_rect,
51 float contents_scale) const; 51 float contents_scale,
52 bool include_images) const;
52 53
53 // Similar to above, except that the canvas passed here can (or was already) 54 // Similar to above, except that the canvas passed here can (or was already)
54 // rasterized into by another raster source. That is, it is not safe to clear 55 // rasterized into by another raster source. That is, it is not safe to clear
55 // the canvas or discard its underlying memory. 56 // the canvas or discard its underlying memory.
56 void PlaybackToSharedCanvas(SkCanvas* canvas, 57 void PlaybackToSharedCanvas(SkCanvas* canvas,
57 const gfx::Rect& canvas_rect, 58 const gfx::Rect& canvas_rect,
58 float contents_scale) const; 59 float contents_scale,
60 bool include_images) const;
59 61
60 // Returns whether the given rect at given scale is of solid color in 62 // Returns whether the given rect at given scale is of solid color in
61 // this raster source, as well as the solid color value. 63 // this raster source, as well as the solid color value.
62 bool PerformSolidColorAnalysis(const gfx::Rect& content_rect, 64 bool PerformSolidColorAnalysis(const gfx::Rect& content_rect,
63 float contents_scale, 65 float contents_scale,
64 SkColor* color) const; 66 SkColor* color) const;
65 67
66 // Returns true iff the whole raster source is of solid color. 68 // Returns true iff the whole raster source is of solid color.
67 bool IsSolidColor() const; 69 bool IsSolidColor() const;
68 70
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 169
168 // Used to ensure that memory dump logic always happens on the same thread. 170 // Used to ensure that memory dump logic always happens on the same thread.
169 base::ThreadChecker memory_dump_thread_checker_; 171 base::ThreadChecker memory_dump_thread_checker_;
170 172
171 DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource); 173 DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource);
172 }; 174 };
173 175
174 } // namespace cc 176 } // namespace cc
175 177
176 #endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ 178 #endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698