| 
    
      
  | 
  
 Chromium Code Reviews| 
         Created: 
          4 years, 5 months ago by Shuhei Takahashi Modified: 
          4 years, 4 months ago Reviewers: 
          
          hidehiko CC: 
          
          
          chromium-reviews, elijahtaylor+arcwatch_chromium.org, yusukes+watch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org Base URL: 
          
          
          https://chromium.googlesource.com/chromium/src.git@master Target Ref: 
          
          
          refs/pending/heads/master Project: 
          
          chromium Visibility: 
          
          
          
        Public.  | 
      
        
  Descriptionarc: Do not keep track of in-flight decode requests.
Since ImageDecoder allows the same ImageRequest to be reused,
ArcWallpaperHandler can implement ImageRequest. We just need to
call ImageDecoder::Cancel() as needed (e.g. on destruction).
BUG=None
TEST=Tested setting wallpaper manually with ARC enabled device.
Committed: https://crrev.com/f4f0263355892832547b5449aa50e41fa118b7c3
Cr-Commit-Position: refs/heads/master@{#407728}
   
  Patch Set 1 #
      Total comments: 4
      
     
  
  Patch Set 2 : Simplify. #
      Total comments: 2
      
     
  
  Patch Set 3 : . #
 Messages
    Total messages: 23 (14 generated)
     
  
  
 nya@chromium.org changed reviewers: + hidehiko@chromium.org 
 hidehiko: PTAL 
 The CQ bit was checked by nya@chromium.org to run a CQ dry run 
 Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 The CQ bit was unchecked by commit-bot@chromium.org 
 Dry run: No L-G-T-M from a valid reviewer yet. CQ run can only be started by full committers or once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files. 
 The code LGTM, but I'd like to hear your design opinion. https://codereview.chromium.org/2175213002/diff/1/chrome/browser/chromeos/arc... File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2175213002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:63: class ArcWallpaperHandler::ImageRequestImpl Optional: Now this class looks not having any important roll? Can this be merged into enclosing class? WDYT? https://codereview.chromium.org/2175213002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:114: if (inflight_request_.get()) { DCHECK_CURRENTLY_ON(UI); here, too? 
 Description was changed from ========== arc: Keep track of at most one in-flight wallpaper request. When a wallpaper request is made while another request is in-flight, we can cancel the in-flight request immediately. BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== to ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be used in multiple decode requests, we don't need to keep track of in-flight requests. We just need to call ImageDecoder::Cancel() on destruction. BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== 
 hidehiko: PTAL Thanks for comments. Could you take another look as I made some non-trivial changes? https://codereview.chromium.org/2175213002/diff/1/chrome/browser/chromeos/arc... File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2175213002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:63: class ArcWallpaperHandler::ImageRequestImpl On 2016/07/25 19:17:20, hidehiko wrote: > Optional: Now this class looks not having any important roll? > Can this be merged into enclosing class? > WDYT? Thanks, now I can implement ImageRequest in ArcWallpaperHandler. https://codereview.chromium.org/2175213002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:114: if (inflight_request_.get()) { On 2016/07/25 19:17:20, hidehiko wrote: > DCHECK_CURRENTLY_ON(UI); here, too? This function was removed. 
 https://codereview.chromium.org/2175213002/diff/10001/chrome/browser/chromeos... File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2175213002/diff/10001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:71: // TODO(nya): Improve ImageDecoder to minimize copy. As we chatted offline, to make the behavior slightly predictable, could you add Cancel(this) here? 
 https://codereview.chromium.org/2175213002/diff/10001/chrome/browser/chromeos... File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2175213002/diff/10001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:71: // TODO(nya): Improve ImageDecoder to minimize copy. On 2016/07/26 06:19:10, hidehiko wrote: > As we chatted offline, to make the behavior slightly predictable, could you add > Cancel(this) here? Done. 
 The CQ bit was checked by nya@chromium.org 
 The patchset sent to the CQ was uploaded after l-g-t-m from hidehiko@chromium.org Link to the patchset: https://codereview.chromium.org/2175213002/#ps30001 (title: ".") 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 The CQ bit was unchecked by nya@chromium.org 
 Description was changed from ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be used in multiple decode requests, we don't need to keep track of in-flight requests. We just need to call ImageDecoder::Cancel() on destruction. BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== to ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be reused, ArcWallpaperHandler can implement ImageRequest. We just need to call ImageDecoder::Cancel() on destruction. BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== 
 Description was changed from ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be reused, ArcWallpaperHandler can implement ImageRequest. We just need to call ImageDecoder::Cancel() on destruction. BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== to ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be reused, ArcWallpaperHandler can implement ImageRequest. We just need to call ImageDecoder::Cancel() as needed (e.g. on destruction). BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== 
 The CQ bit was checked by nya@chromium.org 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or... 
 
            
              
                Message was sent while issue was closed.
              
            
             
          
        Description was changed from ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be reused, ArcWallpaperHandler can implement ImageRequest. We just need to call ImageDecoder::Cancel() as needed (e.g. on destruction). BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== to ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be reused, ArcWallpaperHandler can implement ImageRequest. We just need to call ImageDecoder::Cancel() as needed (e.g. on destruction). BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== 
 
            
              
                Message was sent while issue was closed.
              
            
             
          
        Committed patchset #3 (id:30001) 
 
            
              
                Message was sent while issue was closed.
              
            
             
          
        Description was changed from ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be reused, ArcWallpaperHandler can implement ImageRequest. We just need to call ImageDecoder::Cancel() as needed (e.g. on destruction). BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. ========== to ========== arc: Do not keep track of in-flight decode requests. Since ImageDecoder allows the same ImageRequest to be reused, ArcWallpaperHandler can implement ImageRequest. We just need to call ImageDecoder::Cancel() as needed (e.g. on destruction). BUG=None TEST=Tested setting wallpaper manually with ARC enabled device. Committed: https://crrev.com/f4f0263355892832547b5449aa50e41fa118b7c3 Cr-Commit-Position: refs/heads/master@{#407728} ========== 
 
            
              
                Message was sent while issue was closed.
              
            
             
          
        Patchset 3 (id:??) landed as https://crrev.com/f4f0263355892832547b5449aa50e41fa118b7c3 Cr-Commit-Position: refs/heads/master@{#407728}  | 
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
