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

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

Issue 1633203003: cc: Fix nullptr dereference when capturing skps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | cc/playback/display_list_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_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 18 matching lines...) Expand all
29 static scoped_refptr<DisplayListRasterSource> 29 static scoped_refptr<DisplayListRasterSource>
30 CreateFromDisplayListRecordingSource(const DisplayListRecordingSource* other, 30 CreateFromDisplayListRecordingSource(const DisplayListRecordingSource* other,
31 bool can_use_lcd_text); 31 bool can_use_lcd_text);
32 32
33 // Raster a subrect of this RasterSource into the given canvas. It is 33 // Raster a subrect of this RasterSource into the given canvas. It is
34 // assumed that contents_scale has already been applied to this canvas. 34 // assumed that contents_scale has already been applied to this canvas.
35 // Writes the total number of pixels rasterized and the time spent 35 // Writes the total number of pixels rasterized and the time spent
36 // rasterizing to the stats if the respective pointer is not nullptr. 36 // rasterizing to the stats if the respective pointer is not nullptr.
37 // It is assumed that the canvas passed here will only be rasterized by 37 // It is assumed that the canvas passed here will only be rasterized by
38 // this raster source via this call. 38 // this raster source via this call.
39 // virtual for testing. 39 //
40 // Virtual for testing.
41 //
42 // Note that this should only be called after the image decode controller has
43 // been set, which happens during commit.
40 virtual void PlaybackToCanvas(SkCanvas* canvas, 44 virtual void PlaybackToCanvas(SkCanvas* canvas,
41 const gfx::Rect& canvas_bitmap_rect, 45 const gfx::Rect& canvas_bitmap_rect,
42 const gfx::Rect& canvas_playback_rect, 46 const gfx::Rect& canvas_playback_rect,
43 float contents_scale) const; 47 float contents_scale) const;
44 48
45 // Similar to above, except that the canvas passed here can (or was already) 49 // Similar to above, except that the canvas passed here can (or was already)
46 // rasterized into by another raster source. That is, it is not safe to clear 50 // rasterized into by another raster source. That is, it is not safe to clear
47 // the canvas or discard its underlying memory. 51 // the canvas or discard its underlying memory.
48 void PlaybackToSharedCanvas(SkCanvas* canvas, 52 void PlaybackToSharedCanvas(SkCanvas* canvas,
49 const gfx::Rect& canvas_rect, 53 const gfx::Rect& canvas_rect,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const gfx::Rect& canvas_bitmap_rect, 158 const gfx::Rect& canvas_bitmap_rect,
155 const gfx::Rect& canvas_playback_rect, 159 const gfx::Rect& canvas_playback_rect,
156 float contents_scale) const; 160 float contents_scale) const;
157 161
158 DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource); 162 DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource);
159 }; 163 };
160 164
161 } // namespace cc 165 } // namespace cc
162 166
163 #endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ 167 #endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698