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

Side by Side Diff: cc/test/fake_scrollbar_layer.cc

Issue 12517003: cc: Chromify the Animation and LayerAnimationController classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/test/layer_tree_test_common.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 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/test/fake_scrollbar_layer.h" 5 #include "cc/test/fake_scrollbar_layer.h"
6 6
7 #include "cc/resource_update_queue.h" 7 #include "cc/resource_update_queue.h"
8 #include "cc/test/fake_scrollbar_theme_painter.h" 8 #include "cc/test/fake_scrollbar_theme_painter.h"
9 #include "cc/test/fake_web_scrollbar.h" 9 #include "cc/test/fake_web_scrollbar.h"
10 #include "cc/test/fake_web_scrollbar_theme_geometry.h" 10 #include "cc/test/fake_web_scrollbar_theme_geometry.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 FakeScrollbarLayer::FakeScrollbarLayer( 14 FakeScrollbarLayer::FakeScrollbarLayer(
15 bool paint_during_update, bool has_thumb, int scrolling_layer_id) 15 bool paint_during_update, bool has_thumb, int scrolling_layer_id)
16 : ScrollbarLayer( 16 : ScrollbarLayer(
17 FakeWebScrollbar::Create().PassAs<WebKit::WebScrollbar>(), 17 FakeWebScrollbar::Create().PassAs<WebKit::WebScrollbar>(),
18 FakeScrollbarThemePainter::Create(paint_during_update) 18 FakeScrollbarThemePainter::Create(paint_during_update)
19 .PassAs<ScrollbarThemePainter>(), 19 .PassAs<ScrollbarThemePainter>(),
20 FakeWebScrollbarThemeGeometry::create(has_thumb) 20 FakeWebScrollbarThemeGeometry::create(has_thumb)
21 .PassAs<WebKit::WebScrollbarThemeGeometry>(), 21 .PassAs<WebKit::WebScrollbarThemeGeometry>(),
22 scrolling_layer_id), 22 scrolling_layer_id),
23 update_count_(0), 23 update_count_(0),
24 last_update_full_upload_size_(0), 24 last_update_full_upload_size_(0),
25 last_update_partial_upload_size_(0) { 25 last_update_partial_upload_size_(0) {
26 setAnchorPoint(gfx::PointF(0, 0)); 26 setAnchorPoint(gfx::PointF(0, 0));
27 setBounds(gfx::Size(1, 1)); 27 setBounds(gfx::Size(1, 1));
28 setIsDrawable(true); 28 setIsDrawable(true);
29 } 29 }
30 30
31 FakeScrollbarLayer::~FakeScrollbarLayer() {} 31 FakeScrollbarLayer::~FakeScrollbarLayer() {}
32 32
33 void FakeScrollbarLayer::update( 33 void FakeScrollbarLayer::update(
34 ResourceUpdateQueue& queue, 34 ResourceUpdateQueue& queue,
35 const OcclusionTracker* occlusion, 35 const OcclusionTracker* occlusion,
36 RenderingStats* stats) { 36 RenderingStats* stats) {
37 size_t full = queue.fullUploadSize(); 37 size_t full = queue.fullUploadSize();
38 size_t partial = queue.partialUploadSize(); 38 size_t partial = queue.partialUploadSize();
39 ScrollbarLayer::update(queue, occlusion, stats); 39 ScrollbarLayer::update(queue, occlusion, stats);
40 update_count_++; 40 update_count_++;
41 last_update_full_upload_size_ = queue.fullUploadSize() - full; 41 last_update_full_upload_size_ = queue.fullUploadSize() - full;
42 last_update_partial_upload_size_ = queue.partialUploadSize() - partial; 42 last_update_partial_upload_size_ = queue.partialUploadSize() - partial;
43 } 43 }
44 44
45 } // namespace cc 45 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/test/layer_tree_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698