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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2911463002: Unify the calculation of main thread offset of sticky element (Closed)
Patch Set: Address comments Created 3 years, 6 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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 1090
1091 void GraphicsLayer::SetBackdropFilters(CompositorFilterOperations filters) { 1091 void GraphicsLayer::SetBackdropFilters(CompositorFilterOperations filters) {
1092 PlatformLayer()->SetBackgroundFilters(filters.ReleaseCcFilterOperations()); 1092 PlatformLayer()->SetBackgroundFilters(filters.ReleaseCcFilterOperations());
1093 } 1093 }
1094 1094
1095 void GraphicsLayer::SetStickyPositionConstraint( 1095 void GraphicsLayer::SetStickyPositionConstraint(
1096 const WebLayerStickyPositionConstraint& sticky_constraint) { 1096 const WebLayerStickyPositionConstraint& sticky_constraint) {
1097 layer_->Layer()->SetStickyPositionConstraint(sticky_constraint); 1097 layer_->Layer()->SetStickyPositionConstraint(sticky_constraint);
1098 } 1098 }
1099 1099
1100 void GraphicsLayer::SetStickyMainThreadOffset(const WebSize& offset) {
1101 layer_->Layer()->SetStickyMainThreadOffset(offset);
1102 }
1103
1100 void GraphicsLayer::SetFilterQuality(SkFilterQuality filter_quality) { 1104 void GraphicsLayer::SetFilterQuality(SkFilterQuality filter_quality) {
1101 if (image_layer_) 1105 if (image_layer_)
1102 image_layer_->SetNearestNeighbor(filter_quality == kNone_SkFilterQuality); 1106 image_layer_->SetNearestNeighbor(filter_quality == kNone_SkFilterQuality);
1103 } 1107 }
1104 1108
1105 void GraphicsLayer::SetPaintingPhase(GraphicsLayerPaintingPhase phase) { 1109 void GraphicsLayer::SetPaintingPhase(GraphicsLayerPaintingPhase phase) {
1106 if (painting_phase_ == phase) 1110 if (painting_phase_ == phase)
1107 return; 1111 return;
1108 painting_phase_ = phase; 1112 painting_phase_ = phase;
1109 SetNeedsDisplay(); 1113 SetNeedsDisplay();
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { 1299 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) {
1296 if (!layer) { 1300 if (!layer) {
1297 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; 1301 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil).";
1298 return; 1302 return;
1299 } 1303 }
1300 1304
1301 String output = layer->LayerTreeAsText(blink::kLayerTreeIncludesDebugInfo); 1305 String output = layer->LayerTreeAsText(blink::kLayerTreeIncludesDebugInfo);
1302 LOG(INFO) << output.Utf8().data(); 1306 LOG(INFO) << output.Utf8().data();
1303 } 1307 }
1304 #endif 1308 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698