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

Side by Side Diff: cc/tiles/checker_image_tracker.h

Issue 2703633004: cc: Make image controller return a status with the callback. (Closed)
Patch Set: update Created 3 years, 9 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/tiles/checker_image_tracker.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_TILES_CHECKER_IMAGE_TRACKER_H_ 5 #ifndef CC_TILES_CHECKER_IMAGE_TRACKER_H_
6 #define CC_TILES_CHECKER_IMAGE_TRACKER_H_ 6 #define CC_TILES_CHECKER_IMAGE_TRACKER_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ImageIdFlatSet* checkered_images, 48 ImageIdFlatSet* checkered_images,
49 WhichTree tree); 49 WhichTree tree);
50 50
51 // Returns the set of images to invalidate on the sync tree. 51 // Returns the set of images to invalidate on the sync tree.
52 const ImageIdFlatSet& TakeImagesToInvalidateOnSyncTree(); 52 const ImageIdFlatSet& TakeImagesToInvalidateOnSyncTree();
53 53
54 void DidActivateSyncTree(); 54 void DidActivateSyncTree();
55 55
56 private: 56 private:
57 void DidFinishImageDecode(ImageId image_id, 57 void DidFinishImageDecode(ImageId image_id,
58 ImageController::ImageDecodeRequestId request_id); 58 ImageController::ImageDecodeRequestId request_id,
59 ImageController::ImageDecodeResult result);
59 60
60 // Returns true if the decode for |image| will be deferred to the image decode 61 // Returns true if the decode for |image| will be deferred to the image decode
61 // service and it should be be skipped during raster. 62 // service and it should be be skipped during raster.
62 bool ShouldCheckerImage(const sk_sp<const SkImage>& image, 63 bool ShouldCheckerImage(const sk_sp<const SkImage>& image,
63 WhichTree tree) const; 64 WhichTree tree) const;
64 65
65 void ScheduleImageDecodeIfNecessary(const sk_sp<const SkImage>& image); 66 void ScheduleImageDecodeIfNecessary(const sk_sp<const SkImage>& image);
66 67
67 ImageController* image_controller_; 68 ImageController* image_controller_;
68 CheckerImageTrackerClient* client_; 69 CheckerImageTrackerClient* client_;
(...skipping 22 matching lines...) Expand all
91 // A map of image id to image decode request id for images to be unlocked. 92 // A map of image id to image decode request id for images to be unlocked.
92 std::unordered_map<ImageId, ImageController::ImageDecodeRequestId> 93 std::unordered_map<ImageId, ImageController::ImageDecodeRequestId>
93 image_id_to_decode_request_id_; 94 image_id_to_decode_request_id_;
94 95
95 base::WeakPtrFactory<CheckerImageTracker> weak_factory_; 96 base::WeakPtrFactory<CheckerImageTracker> weak_factory_;
96 }; 97 };
97 98
98 } // namespace cc 99 } // namespace cc
99 100
100 #endif // CC_TILES_CHECKER_IMAGE_TRACKER_H_ 101 #endif // CC_TILES_CHECKER_IMAGE_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/checker_image_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698