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

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

Issue 14017008: Ensure that pinch-zoom scrollbar animations trigger a draw (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prevent unnecessary commits Created 7 years, 8 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/scrollbar_layer.h" 5 #include "cc/layers/scrollbar_layer.h"
6 6
7 #include "base/auto_reset.h"
7 #include "base/basictypes.h" 8 #include "base/basictypes.h"
8 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
9 #include "cc/layers/scrollbar_layer_impl.h" 10 #include "cc/layers/scrollbar_layer_impl.h"
10 #include "cc/resources/caching_bitmap_content_layer_updater.h" 11 #include "cc/resources/caching_bitmap_content_layer_updater.h"
11 #include "cc/resources/layer_painter.h" 12 #include "cc/resources/layer_painter.h"
12 #include "cc/resources/prioritized_resource.h" 13 #include "cc/resources/prioritized_resource.h"
13 #include "cc/resources/resource_update_queue.h" 14 #include "cc/resources/resource_update_queue.h"
14 #include "cc/trees/layer_tree_host.h" 15 #include "cc/trees/layer_tree_host.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
16 #include "ui/gfx/rect_conversions.h" 17 #include "ui/gfx/rect_conversions.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 ScrollbarLayerRectToContentRect(thumb_layer_rect).size(); 394 ScrollbarLayerRectToContentRect(thumb_layer_rect).size();
394 thumb_->texture()->SetDimensions(thumb_size, texture_format_); 395 thumb_->texture()->SetDimensions(thumb_size, texture_format_);
395 thumb_->texture()->set_request_priority( 396 thumb_->texture()->set_request_priority(
396 PriorityCalculator::UIPriority(draws_to_root)); 397 PriorityCalculator::UIPriority(draws_to_root));
397 } 398 }
398 } 399 }
399 400
400 void ScrollbarLayer::Update(ResourceUpdateQueue* queue, 401 void ScrollbarLayer::Update(ResourceUpdateQueue* queue,
401 const OcclusionTracker* occlusion, 402 const OcclusionTracker* occlusion,
402 RenderingStats* stats) { 403 RenderingStats* stats) {
403 ContentsScalingLayer::Update(queue, occlusion, stats); 404 {
405 base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_,
406 true);
407 ContentsScalingLayer::Update(queue, occlusion, stats);
408 }
404 409
405 dirty_rect_.Union(update_rect_); 410 dirty_rect_.Union(update_rect_);
406 if (content_bounds().IsEmpty()) 411 if (content_bounds().IsEmpty())
407 return; 412 return;
408 if (visible_content_rect().IsEmpty()) 413 if (visible_content_rect().IsEmpty())
409 return; 414 return;
410 415
411 CreateUpdaterIfNeeded(); 416 CreateUpdaterIfNeeded();
412 417
413 gfx::Rect content_rect = ScrollbarLayerRectToContentRect( 418 gfx::Rect content_rect = ScrollbarLayerRectToContentRect(
(...skipping 21 matching lines...) Expand all
435 thumb_.get(), 440 thumb_.get(),
436 origin_thumb_rect, 441 origin_thumb_rect,
437 queue, 442 queue,
438 stats); 443 stats);
439 } 444 }
440 445
441 dirty_rect_ = gfx::RectF(); 446 dirty_rect_ = gfx::RectF();
442 } 447 }
443 448
444 } // namespace cc 449 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | cc/trees/layer_tree_host_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698