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

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

Issue 647253002: cc: Stop converting update rect from int to float to int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displayrectint: ccperftests Created 6 years, 2 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
« no previous file with comments | « cc/test/tiled_layer_test_common.h ('k') | cc/trees/damage_tracker_unittest.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/tiled_layer_test_common.h" 5 #include "cc/test/tiled_layer_test_common.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer, 9 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer,
10 scoped_ptr<PrioritizedResource> texture) 10 scoped_ptr<PrioritizedResource> texture)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds( 82 FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds(
83 PrioritizedResourceManager* resource_manager) 83 PrioritizedResourceManager* resource_manager)
84 : FakeTiledLayer(resource_manager) {} 84 : FakeTiledLayer(resource_manager) {}
85 85
86 FakeTiledLayerWithScaledBounds::~FakeTiledLayerWithScaledBounds() {} 86 FakeTiledLayerWithScaledBounds::~FakeTiledLayerWithScaledBounds() {}
87 87
88 FakeTiledLayer::~FakeTiledLayer() {} 88 FakeTiledLayer::~FakeTiledLayer() {}
89 89
90 void FakeTiledLayer::SetNeedsDisplayRect(const gfx::RectF& rect) { 90 void FakeTiledLayer::SetNeedsDisplayRect(const gfx::Rect& rect) {
91 last_needs_display_rect_ = rect; 91 last_needs_display_rect_ = rect;
92 TiledLayer::SetNeedsDisplayRect(rect); 92 TiledLayer::SetNeedsDisplayRect(rect);
93 } 93 }
94 94
95 void FakeTiledLayer::SetTexturePriorities( 95 void FakeTiledLayer::SetTexturePriorities(
96 const PriorityCalculator& calculator) { 96 const PriorityCalculator& calculator) {
97 // Ensure there is always a target render surface available. If none has been 97 // Ensure there is always a target render surface available. If none has been
98 // set (the layer is an orphan for the test), then just set a surface on 98 // set (the layer is an orphan for the test), then just set a surface on
99 // itself. 99 // itself.
100 bool missing_target_render_surface = !render_target(); 100 bool missing_target_render_surface = !render_target();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 float* contents_scale_y, 157 float* contents_scale_y,
158 gfx::Size* content_bounds) { 158 gfx::Size* content_bounds) {
159 *contents_scale_x = 159 *contents_scale_x =
160 static_cast<float>(forced_content_bounds_.width()) / bounds().width(); 160 static_cast<float>(forced_content_bounds_.width()) / bounds().width();
161 *contents_scale_y = 161 *contents_scale_y =
162 static_cast<float>(forced_content_bounds_.height()) / bounds().height(); 162 static_cast<float>(forced_content_bounds_.height()) / bounds().height();
163 *content_bounds = forced_content_bounds_; 163 *content_bounds = forced_content_bounds_;
164 } 164 }
165 165
166 } // namespace cc 166 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/tiled_layer_test_common.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698