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

Side by Side Diff: cc/scrollbar_layer.cc

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revisions, force PZ scrollbars to always draw. Created 7 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
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/scrollbar_layer.h" 5 #include "cc/scrollbar_layer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/caching_bitmap_content_layer_updater.h" 9 #include "cc/caching_bitmap_content_layer_updater.h"
10 #include "cc/layer_painter.h" 10 #include "cc/layer_painter.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ScrollbarLayer::~ScrollbarLayer() {} 54 ScrollbarLayer::~ScrollbarLayer() {}
55 55
56 void ScrollbarLayer::SetScrollLayerId(int id) { 56 void ScrollbarLayer::SetScrollLayerId(int id) {
57 if (id == scroll_layer_id_) 57 if (id == scroll_layer_id_)
58 return; 58 return;
59 59
60 scroll_layer_id_ = id; 60 scroll_layer_id_ = id;
61 SetNeedsFullTreeSync(); 61 SetNeedsFullTreeSync();
62 } 62 }
63 63
64 bool ScrollbarLayer::DoNotSkipOnZeroOpacity() const {
65 return scroll_layer_id_ == Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID;
66 }
67
64 WebKit::WebScrollbar::Orientation ScrollbarLayer::Orientation() const { 68 WebKit::WebScrollbar::Orientation ScrollbarLayer::Orientation() const {
65 return scrollbar_->orientation(); 69 return scrollbar_->orientation();
66 } 70 }
67 71
68 int ScrollbarLayer::MaxTextureSize() { 72 int ScrollbarLayer::MaxTextureSize() {
69 DCHECK(layer_tree_host()); 73 DCHECK(layer_tree_host());
70 return layer_tree_host()->rendererCapabilities().maxTextureSize; 74 return layer_tree_host()->rendererCapabilities().maxTextureSize;
71 } 75 }
72 76
73 float ScrollbarLayer::ClampScaleToMaxTextureSize(float scale) { 77 float ScrollbarLayer::ClampScaleToMaxTextureSize(float scale) {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 thumb_.get(), 426 thumb_.get(),
423 origin_thumb_rect, 427 origin_thumb_rect,
424 queue, 428 queue,
425 stats); 429 stats);
426 } 430 }
427 431
428 dirty_rect_ = gfx::RectF(); 432 dirty_rect_ = gfx::RectF();
429 } 433 }
430 434
431 } // namespace cc 435 } // namespace cc
OLDNEW
« cc/layer_tree_host.cc ('K') | « cc/scrollbar_layer.h ('k') | cc/scrollbar_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698