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

Side by Side Diff: cc/raster/raster_source.h

Issue 2857923004: cc: Keep PaintImage in DrawImage. (Closed)
Patch Set: .. Created 3 years, 7 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/raster/image_hijack_canvas_unittest.cc ('k') | cc/raster/raster_source.cc » ('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_RASTER_RASTER_SOURCE_H_ 5 #ifndef CC_RASTER_RASTER_SOURCE_H_
6 #define CC_RASTER_RASTER_SOURCE_H_ 6 #define CC_RASTER_RASTER_SOURCE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool skip_images; 44 bool skip_images;
45 45
46 // If set to true, we will use an image hijack canvas, which enables 46 // If set to true, we will use an image hijack canvas, which enables
47 // compositor image caching. 47 // compositor image caching.
48 bool use_image_hijack_canvas; 48 bool use_image_hijack_canvas;
49 49
50 // If non-empty, an image hijack canvas will be used to skip these images 50 // If non-empty, an image hijack canvas will be used to skip these images
51 // during raster. 51 // during raster.
52 // TODO(khushalsagar): Consolidate more settings for playback here? See 52 // TODO(khushalsagar): Consolidate more settings for playback here? See
53 // crbug.com/691076. 53 // crbug.com/691076.
54 ImageIdFlatSet images_to_skip; 54 SkImageIdFlatSet images_to_skip;
55 }; 55 };
56 56
57 static scoped_refptr<RasterSource> CreateFromRecordingSource( 57 static scoped_refptr<RasterSource> CreateFromRecordingSource(
58 const RecordingSource* other, 58 const RecordingSource* other,
59 bool can_use_lcd_text); 59 bool can_use_lcd_text);
60 60
61 // Helper function to apply a few common operations before passing the canvas 61 // Helper function to apply a few common operations before passing the canvas
62 // to the shorter version. This is useful for rastering into tiles. 62 // to the shorter version. This is useful for rastering into tiles.
63 // canvas is expected to be backed by a tile, with a default state. 63 // canvas is expected to be backed by a tile, with a default state.
64 // raster_transform will be applied to the display list, rastering the list 64 // raster_transform will be applied to the display list, rastering the list
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Return true iff this raster source can raster the given rect in layer 114 // Return true iff this raster source can raster the given rect in layer
115 // space. 115 // space.
116 bool CoversRect(const gfx::Rect& layer_rect) const; 116 bool CoversRect(const gfx::Rect& layer_rect) const;
117 117
118 // Returns true if this raster source has anything to rasterize. 118 // Returns true if this raster source has anything to rasterize.
119 virtual bool HasRecordings() const; 119 virtual bool HasRecordings() const;
120 120
121 // Valid rectangle in which everything is recorded and can be rastered from. 121 // Valid rectangle in which everything is recorded and can be rastered from.
122 virtual gfx::Rect RecordedViewport() const; 122 virtual gfx::Rect RecordedViewport() const;
123 123
124 gfx::Rect GetRectForImage(ImageId image_id) const; 124 gfx::Rect GetRectForImage(PaintImage::Id image_id) const;
125 125
126 // Tracing functionality. 126 // Tracing functionality.
127 virtual void DidBeginTracing(); 127 virtual void DidBeginTracing();
128 virtual void AsValueInto(base::trace_event::TracedValue* array) const; 128 virtual void AsValueInto(base::trace_event::TracedValue* array) const;
129 virtual sk_sp<SkPicture> GetFlattenedPicture(); 129 virtual sk_sp<SkPicture> GetFlattenedPicture();
130 virtual size_t GetMemoryUsage() const; 130 virtual size_t GetMemoryUsage() const;
131 131
132 // Return true if LCD anti-aliasing may be used when rastering text. 132 // Return true if LCD anti-aliasing may be used when rastering text.
133 virtual bool CanUseLCDText() const; 133 virtual bool CanUseLCDText() const;
134 134
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 SkPicture::AbortCallback* callback = nullptr) const; 171 SkPicture::AbortCallback* callback = nullptr) const;
172 172
173 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; 173 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const;
174 174
175 DISALLOW_COPY_AND_ASSIGN(RasterSource); 175 DISALLOW_COPY_AND_ASSIGN(RasterSource);
176 }; 176 };
177 177
178 } // namespace cc 178 } // namespace cc
179 179
180 #endif // CC_RASTER_RASTER_SOURCE_H_ 180 #endif // CC_RASTER_RASTER_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/raster/image_hijack_canvas_unittest.cc ('k') | cc/raster/raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698