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

Side by Side Diff: cc/blink/web_layer_impl.cc

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/blink/web_layer_impl.h" 5 #include "cc/blink/web_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 void WebLayerImpl::setBackgroundFilters(const cc::FilterOperations& filters) { 212 void WebLayerImpl::setBackgroundFilters(const cc::FilterOperations& filters) {
213 layer_->SetBackgroundFilters(filters); 213 layer_->SetBackgroundFilters(filters);
214 } 214 }
215 215
216 bool WebLayerImpl::hasActiveAnimationForTesting() { 216 bool WebLayerImpl::hasActiveAnimationForTesting() {
217 return layer_->HasActiveAnimationForTesting(); 217 return layer_->HasActiveAnimationForTesting();
218 } 218 }
219 219
220 void WebLayerImpl::setScrollPositionDouble(blink::WebDoublePoint position) { 220 void WebLayerImpl::setScrollOffset(blink::WebFloatSize offset) {
221 layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y)); 221 layer_->SetScrollOffset(gfx::ScrollOffset(offset.width, offset.height));
222 } 222 }
223 223
224 blink::WebDoublePoint WebLayerImpl::scrollPositionDouble() const { 224 blink::WebFloatSize WebLayerImpl::scrollOffset() const {
225 return blink::WebDoublePoint(layer_->scroll_offset().x(), 225 return blink::WebFloatSize(layer_->scroll_offset().x(),
226 layer_->scroll_offset().y()); 226 layer_->scroll_offset().y());
227 } 227 }
228 228
229 void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) { 229 void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) {
230 if (!clip_layer) { 230 if (!clip_layer) {
231 layer_->SetScrollClipLayerId(Layer::INVALID_ID); 231 layer_->SetScrollClipLayerId(Layer::INVALID_ID);
232 return; 232 return;
233 } 233 }
234 layer_->SetScrollClipLayerId(clip_layer->id()); 234 layer_->SetScrollClipLayerId(clip_layer->id());
235 } 235 }
236 236
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { 465 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) {
466 contents_opaque_is_fixed_ = fixed; 466 contents_opaque_is_fixed_ = fixed;
467 } 467 }
468 468
469 void WebLayerImpl::setHasWillChangeTransformHint(bool has_will_change) { 469 void WebLayerImpl::setHasWillChangeTransformHint(bool has_will_change) {
470 layer_->SetHasWillChangeTransformHint(has_will_change); 470 layer_->SetHasWillChangeTransformHint(has_will_change);
471 } 471 }
472 472
473 } // namespace cc_blink 473 } // namespace cc_blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698