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

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

Issue 2161633003: Fix MultiPictureDraw issues with GpuImageDecodeController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: fix unit test build in branch Created 4 years, 5 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/layers/picture_layer_impl.cc ('k') | cc/playback/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_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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 virtual sk_sp<SkPicture> GetFlattenedPicture(); 107 virtual sk_sp<SkPicture> GetFlattenedPicture();
108 virtual size_t GetPictureMemoryUsage() const; 108 virtual size_t GetPictureMemoryUsage() const;
109 109
110 // Return true if LCD anti-aliasing may be used when rastering text. 110 // Return true if LCD anti-aliasing may be used when rastering text.
111 virtual bool CanUseLCDText() const; 111 virtual bool CanUseLCDText() const;
112 112
113 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const; 113 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const;
114 114
115 // Image decode controller should be set once. Its lifetime has to exceed that 115 // Image decode controller should be set once. Its lifetime has to exceed that
116 // of the raster source, since the raster source will access it during raster. 116 // of the raster source, since the raster source will access it during raster.
117 void SetImageDecodeController(ImageDecodeController* image_decode_controller); 117 void set_image_decode_controller(
118 ImageDecodeController* image_decode_controller) {
119 DCHECK(image_decode_controller);
120 image_decode_controller_ = image_decode_controller;
121 }
122
123 // Returns the ImageDecodeController, currently only used by
124 // GpuRasterBufferProvider in order to create its own ImageHijackCanvas.
125 // Because of the MultiPictureDraw approach used by GPU raster, it does not
126 // integrate well with the use of the ImageHijackCanvas internal to this
127 // class. See gpu_raster_buffer_provider.cc for more information.
128 // TODO(crbug.com/628394): Redesign this to avoid exposing
129 // ImageDecodeController from the raster source.
130 ImageDecodeController* image_decode_controller() const {
131 return image_decode_controller_;
132 }
118 133
119 protected: 134 protected:
120 friend class base::RefCountedThreadSafe<RasterSource>; 135 friend class base::RefCountedThreadSafe<RasterSource>;
121 136
122 RasterSource(const RecordingSource* other, bool can_use_lcd_text); 137 RasterSource(const RecordingSource* other, bool can_use_lcd_text);
123 RasterSource(const RasterSource* other, bool can_use_lcd_text); 138 RasterSource(const RasterSource* other, bool can_use_lcd_text);
124 virtual ~RasterSource(); 139 virtual ~RasterSource();
125 140
126 // These members are const as this raster source may be in use on another 141 // These members are const as this raster source may be in use on another
127 // thread and so should not be touched after construction. 142 // thread and so should not be touched after construction.
(...skipping 27 matching lines...) Expand all
155 const gfx::Rect& canvas_bitmap_rect, 170 const gfx::Rect& canvas_bitmap_rect,
156 const gfx::Rect& canvas_playback_rect, 171 const gfx::Rect& canvas_playback_rect,
157 float contents_scale) const; 172 float contents_scale) const;
158 173
159 DISALLOW_COPY_AND_ASSIGN(RasterSource); 174 DISALLOW_COPY_AND_ASSIGN(RasterSource);
160 }; 175 };
161 176
162 } // namespace cc 177 } // namespace cc
163 178
164 #endif // CC_PLAYBACK_RASTER_SOURCE_H_ 179 #endif // CC_PLAYBACK_RASTER_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/playback/raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698