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

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

Issue 2928433003: cc: Add scaling for checkered images. (Closed)
Patch Set: .. 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
« no previous file with comments | « cc/tiles/decoded_image_tracker_unittest.cc ('k') | cc/tiles/image_controller.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_IMAGE_CONTROLLER_H_ 5 #ifndef CC_TILES_IMAGE_CONTROLLER_H_
6 #define CC_TILES_IMAGE_CONTROLLER_H_ 6 #define CC_TILES_IMAGE_CONTROLLER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // Virtual for testing. 49 // Virtual for testing.
50 virtual void UnlockImageDecode(ImageDecodeRequestId id); 50 virtual void UnlockImageDecode(ImageDecodeRequestId id);
51 51
52 // This function requests that the given image be decoded and locked. Once the 52 // This function requests that the given image be decoded and locked. Once the
53 // callback has been issued, it is passed an ID, which should be used to 53 // callback has been issued, it is passed an ID, which should be used to
54 // unlock this image. It is up to the caller to ensure that the image is later 54 // unlock this image. It is up to the caller to ensure that the image is later
55 // unlocked using UnlockImageDecode. 55 // unlocked using UnlockImageDecode.
56 // Virtual for testing. 56 // Virtual for testing.
57 virtual ImageDecodeRequestId QueueImageDecode( 57 virtual ImageDecodeRequestId QueueImageDecode(
58 sk_sp<const SkImage> image, 58 const DrawImage& draw_image,
59 const ImageDecodedCallback& callback); 59 const ImageDecodedCallback& callback);
60 size_t image_cache_max_limit_bytes() const { 60 size_t image_cache_max_limit_bytes() const {
61 return image_cache_max_limit_bytes_; 61 return image_cache_max_limit_bytes_;
62 } 62 }
63 63
64 void SetMaxImageCacheLimitBytesForTesting(size_t bytes) { 64 void SetMaxImageCacheLimitBytesForTesting(size_t bytes) {
65 image_cache_max_limit_bytes_ = bytes; 65 image_cache_max_limit_bytes_ = bytes;
66 } 66 }
67 67
68 protected: 68 protected:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 std::vector<ImageDecodeRequest> orphaned_decode_requests_; 122 std::vector<ImageDecodeRequest> orphaned_decode_requests_;
123 123
124 base::WeakPtrFactory<ImageController> weak_ptr_factory_; 124 base::WeakPtrFactory<ImageController> weak_ptr_factory_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(ImageController); 126 DISALLOW_COPY_AND_ASSIGN(ImageController);
127 }; 127 };
128 128
129 } // namespace cc 129 } // namespace cc
130 130
131 #endif // CC_TILES_IMAGE_CONTROLLER_H_ 131 #endif // CC_TILES_IMAGE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « cc/tiles/decoded_image_tracker_unittest.cc ('k') | cc/tiles/image_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698