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

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

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Update unittests for RasterSource Created 3 years, 6 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_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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // 81 //
82 // Virtual for testing. 82 // Virtual for testing.
83 // 83 //
84 // Note that this should only be called after the image decode controller has 84 // Note that this should only be called after the image decode controller has
85 // been set, which happens during commit. 85 // been set, which happens during commit.
86 virtual void PlaybackToCanvas(SkCanvas* canvas, 86 virtual void PlaybackToCanvas(SkCanvas* canvas,
87 const gfx::ColorSpace& target_color_space, 87 const gfx::ColorSpace& target_color_space,
88 const PlaybackSettings& settings) const; 88 const PlaybackSettings& settings) const;
89 89
90 // Returns whether the given rect at given scale is of solid color in 90 // Returns whether the given rect at given scale is of solid color in
91 // this raster source, as well as the solid color value. 91 // this raster source, as well as the solid color value.
oshima 2017/06/15 22:59:12 update the comment
malaykeshav 2017/06/16 20:41:57 Done
92 bool PerformSolidColorAnalysis(const gfx::Rect& content_rect, 92 bool PerformSolidColorAnalysis(gfx::Rect content_rect,
93 float contents_scale, 93 const gfx::AxisTransform2d& raster_transform,
94 SkColor* color) const; 94 SkColor* color) const;
95 95
96 // Returns true iff the whole raster source is of solid color. 96 // Returns true iff the whole raster source is of solid color.
97 bool IsSolidColor() const; 97 bool IsSolidColor() const;
98 98
99 // Returns the color of the raster source if it is solid color. The results 99 // Returns the color of the raster source if it is solid color. The results
100 // are unspecified if IsSolidColor returns false. 100 // are unspecified if IsSolidColor returns false.
101 SkColor GetSolidColor() const; 101 SkColor GetSolidColor() const;
102 102
103 // Returns the size of this raster source. 103 // Returns the size of this raster source.
(...skipping 67 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

Powered by Google App Engine
This is Rietveld 408576698