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

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

Issue 2535153002: Remove intermediate SkPicture recording from GPU tile rasterization. (Closed)
Patch Set: Rebase. Created 4 years 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/raster/gpu_raster_buffer_provider.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_RASTER_SOURCE_H_ 5 #ifndef CC_PLAYBACK_RASTER_SOURCE_H_
6 #define CC_PLAYBACK_RASTER_SOURCE_H_ 6 #define CC_PLAYBACK_RASTER_SOURCE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const; 127 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const;
128 128
129 // Image decode controller should be set once. Its lifetime has to exceed that 129 // Image decode controller should be set once. Its lifetime has to exceed that
130 // of the raster source, since the raster source will access it during raster. 130 // of the raster source, since the raster source will access it during raster.
131 void set_image_decode_cache(ImageDecodeCache* image_decode_cache) { 131 void set_image_decode_cache(ImageDecodeCache* image_decode_cache) {
132 DCHECK(image_decode_cache); 132 DCHECK(image_decode_cache);
133 image_decode_cache_ = image_decode_cache; 133 image_decode_cache_ = image_decode_cache;
134 } 134 }
135 135
136 // Returns the ImageDecodeCache, currently only used by
137 // GpuRasterBufferProvider in order to create its own ImageHijackCanvas.
138 // Because of the MultiPictureDraw approach used by GPU raster, it does not
139 // integrate well with the use of the ImageHijackCanvas internal to this
140 // class. See gpu_raster_buffer_provider.cc for more information.
141 // TODO(crbug.com/628394): Redesign this to avoid exposing
142 // ImageDecodeCache from the raster source.
143 ImageDecodeCache* image_decode_cache() const { return image_decode_cache_; }
144
145 protected: 136 protected:
146 friend class base::RefCountedThreadSafe<RasterSource>; 137 friend class base::RefCountedThreadSafe<RasterSource>;
147 138
148 RasterSource(const RecordingSource* other, bool can_use_lcd_text); 139 RasterSource(const RecordingSource* other, bool can_use_lcd_text);
149 RasterSource(const RasterSource* other, bool can_use_lcd_text); 140 RasterSource(const RasterSource* other, bool can_use_lcd_text);
150 virtual ~RasterSource(); 141 virtual ~RasterSource();
151 142
152 // These members are const as this raster source may be in use on another 143 // These members are const as this raster source may be in use on another
153 // thread and so should not be touched after construction. 144 // thread and so should not be touched after construction.
154 const scoped_refptr<DisplayItemList> display_list_; 145 const scoped_refptr<DisplayItemList> display_list_;
(...skipping 19 matching lines...) Expand all
174 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const; 165 void RasterCommon(SkCanvas* canvas, SkPicture::AbortCallback* callback) const;
175 166
176 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const; 167 void PrepareForPlaybackToCanvas(SkCanvas* canvas) const;
177 168
178 DISALLOW_COPY_AND_ASSIGN(RasterSource); 169 DISALLOW_COPY_AND_ASSIGN(RasterSource);
179 }; 170 };
180 171
181 } // namespace cc 172 } // namespace cc
182 173
183 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ 174 #endif // CC_PLAYBACK_RASTER_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/raster/gpu_raster_buffer_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698