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

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

Issue 11662003: cc: Put context-loss tests in layer_tree_host_unittest_context.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 80cols Created 7 years, 11 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/fake_scrollbar_layer.h ('k') | cc/test/fake_video_frame.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 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/test/fake_scrollbar_theme_painter.h" 7 #include "cc/test/fake_scrollbar_theme_painter.h"
8 #include "cc/test/fake_web_scrollbar.h" 8 #include "cc/test/fake_web_scrollbar.h"
9 #include "cc/test/fake_web_scrollbar_theme_geometry.h" 9 #include "cc/test/fake_web_scrollbar_theme_geometry.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 FakeScrollbarLayer::FakeScrollbarLayer( 13 FakeScrollbarLayer::FakeScrollbarLayer(
14 bool paint_during_update, int scrolling_layer_id) 14 bool paint_during_update, bool has_thumb, int scrolling_layer_id)
15 : ScrollbarLayer( 15 : ScrollbarLayer(
16 FakeWebScrollbar::create().PassAs<WebKit::WebScrollbar>(), 16 FakeWebScrollbar::create().PassAs<WebKit::WebScrollbar>(),
17 FakeScrollbarThemePainter::Create(paint_during_update) 17 FakeScrollbarThemePainter::Create(paint_during_update)
18 .PassAs<ScrollbarThemePainter>(), 18 .PassAs<ScrollbarThemePainter>(),
19 FakeWebScrollbarThemeGeometry::create() 19 FakeWebScrollbarThemeGeometry::create(has_thumb)
20 .PassAs<WebKit::WebScrollbarThemeGeometry>(), 20 .PassAs<WebKit::WebScrollbarThemeGeometry>(),
21 scrolling_layer_id), 21 scrolling_layer_id),
22 update_count_(0) { 22 update_count_(0) {
23 setAnchorPoint(gfx::PointF(0, 0)); 23 setAnchorPoint(gfx::PointF(0, 0));
24 setBounds(gfx::Size(1, 1)); 24 setBounds(gfx::Size(1, 1));
25 setIsDrawable(true); 25 setIsDrawable(true);
26 } 26 }
27 27
28 FakeScrollbarLayer::~FakeScrollbarLayer() {} 28 FakeScrollbarLayer::~FakeScrollbarLayer() {}
29 29
30 void FakeScrollbarLayer::update( 30 void FakeScrollbarLayer::update(
31 ResourceUpdateQueue& queue, 31 ResourceUpdateQueue& queue,
32 const OcclusionTracker* occlusion, 32 const OcclusionTracker* occlusion,
33 RenderingStats& stats) { 33 RenderingStats& stats) {
34 ScrollbarLayer::update(queue, occlusion, stats); 34 ScrollbarLayer::update(queue, occlusion, stats);
35 update_count_++; 35 update_count_++;
36 } 36 }
37 37
38 } // namespace cc 38 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_scrollbar_layer.h ('k') | cc/test/fake_video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698