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

Side by Side Diff: cc/layers/painted_scrollbar_layer.cc

Issue 183563003: cc: Clean up OcclusionTracker template parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: occlusionparams: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | cc/layers/picture_layer.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "cc/layers/painted_scrollbar_layer.h" 5 #include "cc/layers/painted_scrollbar_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/layers/painted_scrollbar_layer_impl.h" 10 #include "cc/layers/painted_scrollbar_layer_impl.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 UpdateProperty(scrollbar_->Location(), &location_); 195 UpdateProperty(scrollbar_->Location(), &location_);
196 UpdateProperty(scrollbar_->IsOverlay(), &is_overlay_); 196 UpdateProperty(scrollbar_->IsOverlay(), &is_overlay_);
197 UpdateProperty(scrollbar_->HasThumb(), &has_thumb_); 197 UpdateProperty(scrollbar_->HasThumb(), &has_thumb_);
198 if (has_thumb_) { 198 if (has_thumb_) {
199 UpdateProperty(scrollbar_->ThumbThickness(), &thumb_thickness_); 199 UpdateProperty(scrollbar_->ThumbThickness(), &thumb_thickness_);
200 UpdateProperty(scrollbar_->ThumbLength(), &thumb_length_); 200 UpdateProperty(scrollbar_->ThumbLength(), &thumb_length_);
201 } 201 }
202 } 202 }
203 203
204 bool PaintedScrollbarLayer::Update(ResourceUpdateQueue* queue, 204 bool PaintedScrollbarLayer::Update(ResourceUpdateQueue* queue,
205 const OcclusionTracker* occlusion) { 205 const OcclusionTracker<Layer>* occlusion) {
206 UpdateThumbAndTrackGeometry(); 206 UpdateThumbAndTrackGeometry();
207 207
208 gfx::Rect track_layer_rect = gfx::Rect(location_, bounds()); 208 gfx::Rect track_layer_rect = gfx::Rect(location_, bounds());
209 gfx::Rect scaled_track_rect = ScrollbarLayerRectToContentRect( 209 gfx::Rect scaled_track_rect = ScrollbarLayerRectToContentRect(
210 track_layer_rect); 210 track_layer_rect);
211 211
212 if (track_rect_.IsEmpty() || scaled_track_rect.IsEmpty()) 212 if (track_rect_.IsEmpty() || scaled_track_rect.IsEmpty())
213 return false; 213 return false;
214 214
215 { 215 {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 scrollbar_->PaintPart(&skcanvas, part, layer_rect); 274 scrollbar_->PaintPart(&skcanvas, part, layer_rect);
275 // Make sure that the pixels are no longer mutable to unavoid unnecessary 275 // Make sure that the pixels are no longer mutable to unavoid unnecessary
276 // allocation and copying. 276 // allocation and copying.
277 skbitmap.setImmutable(); 277 skbitmap.setImmutable();
278 278
279 return UIResourceBitmap(skbitmap); 279 return UIResourceBitmap(skbitmap);
280 } 280 }
281 281
282 } // namespace cc 282 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698