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

Side by Side Diff: cc/paint/discardable_image_map.h

Issue 2866173002: [WIP] cc: Use sRGB for rastering non-wide-color-gamut content
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 | « no previous file | cc/paint/discardable_image_map.cc » ('j') | cc/paint/discardable_image_map.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PAINT_DISCARDABLE_IMAGE_MAP_H_ 5 #ifndef CC_PAINT_DISCARDABLE_IMAGE_MAP_H_
6 #define CC_PAINT_DISCARDABLE_IMAGE_MAP_H_ 6 #define CC_PAINT_DISCARDABLE_IMAGE_MAP_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 private: 39 private:
40 DiscardableImageMap* image_map_; 40 DiscardableImageMap* image_map_;
41 std::unique_ptr<DiscardableImageStore> image_store_; 41 std::unique_ptr<DiscardableImageStore> image_store_;
42 }; 42 };
43 43
44 DiscardableImageMap(); 44 DiscardableImageMap();
45 ~DiscardableImageMap(); 45 ~DiscardableImageMap();
46 46
47 bool empty() const { return all_images_.empty(); } 47 bool empty() const { return all_images_.empty(); }
48 bool has_non_srgb_images() const { return has_non_srgb_images_; }
48 void GetDiscardableImagesInRect(const gfx::Rect& rect, 49 void GetDiscardableImagesInRect(const gfx::Rect& rect,
49 float contents_scale, 50 float contents_scale,
50 const gfx::ColorSpace& target_color_space, 51 const gfx::ColorSpace& target_color_space,
51 std::vector<DrawImage>* images) const; 52 std::vector<DrawImage>* images) const;
52 gfx::Rect GetRectForImage(ImageId image_id) const; 53 gfx::Rect GetRectForImage(ImageId image_id) const;
53 54
54 private: 55 private:
55 friend class ScopedMetadataGenerator; 56 friend class ScopedMetadataGenerator;
56 friend class DiscardableImageMapTest; 57 friend class DiscardableImageMapTest;
57 58
58 std::unique_ptr<DiscardableImageStore> BeginGeneratingMetadata( 59 std::unique_ptr<DiscardableImageStore> BeginGeneratingMetadata(
59 const gfx::Size& bounds); 60 const gfx::Size& bounds);
60 void EndGeneratingMetadata(); 61 void EndGeneratingMetadata();
61 62
62 std::vector<std::pair<DrawImage, gfx::Rect>> all_images_; 63 std::vector<std::pair<DrawImage, gfx::Rect>> all_images_;
63 base::flat_map<ImageId, gfx::Rect> image_id_to_rect_; 64 base::flat_map<ImageId, gfx::Rect> image_id_to_rect_;
65 bool has_non_srgb_images_ = false;
64 66
65 RTree images_rtree_; 67 RTree images_rtree_;
66 }; 68 };
67 69
68 } // namespace cc 70 } // namespace cc
69 71
70 #endif // CC_PAINT_DISCARDABLE_IMAGE_MAP_H_ 72 #endif // CC_PAINT_DISCARDABLE_IMAGE_MAP_H_
OLDNEW
« no previous file with comments | « no previous file | cc/paint/discardable_image_map.cc » ('j') | cc/paint/discardable_image_map.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698