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

Side by Side Diff: Source/core/platform/graphics/GraphicsLayer.cpp

Issue 22419002: Set up clip and scroll parents on the blink side. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 4 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
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 m_offsetFromRenderer = offset; 352 m_offsetFromRenderer = offset;
353 353
354 // If the compositing layer offset changes, we need to repaint. 354 // If the compositing layer offset changes, we need to repaint.
355 if (shouldSetNeedsDisplay == SetNeedsDisplay) 355 if (shouldSetNeedsDisplay == SetNeedsDisplay)
356 setNeedsDisplay(); 356 setNeedsDisplay();
357 } 357 }
358 358
359 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I ntRect& clip) 359 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I ntRect& clip)
360 { 360 {
361 if (m_client) 361 if (m_client) {
362 TRACE_EVENT_INSTANT2("core,painting", "GraphicsLayer::paintGraphicsLayer Contents",
enne (OOO) 2013/08/22 20:54:30 I think we already are tracing this from the compo
363 "width", clip.width(), "height", clip.height());
364
362 m_client->paintContents(this, context, m_paintingPhase, clip); 365 m_client->paintContents(this, context, m_paintingPhase, clip);
366 }
363 } 367 }
364 368
365 String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property) 369 String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property)
366 { 370 {
367 // | is not a valid identifier character in CSS, so this can never conflict with a keyframe identifier. 371 // | is not a valid identifier character in CSS, so this can never conflict with a keyframe identifier.
368 StringBuilder id; 372 StringBuilder id;
369 id.appendLiteral("-|transition"); 373 id.appendLiteral("-|transition");
370 id.appendNumber(static_cast<int>(property)); 374 id.appendNumber(static_cast<int>(property));
371 id.append('-'); 375 id.append('-');
372 return id.toString(); 376 return id.toString();
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 m_client->notifyAnimationStarted(this, startTime); 1299 m_client->notifyAnimationStarted(this, startTime);
1296 } 1300 }
1297 1301
1298 void GraphicsLayer::notifyAnimationFinished(double) 1302 void GraphicsLayer::notifyAnimationFinished(double)
1299 { 1303 {
1300 // Do nothing. 1304 // Do nothing.
1301 } 1305 }
1302 1306
1303 void GraphicsLayer::didScroll() 1307 void GraphicsLayer::didScroll()
1304 { 1308 {
1309 TRACE_EVENT1(
1310 "impl-scroll",
1311 "GraphicsLayer::didScroll",
1312 "layerId",
1313 m_layer->layer()->id());
1314
1305 if (m_scrollableArea) 1315 if (m_scrollableArea)
1306 m_scrollableArea->scrollToOffsetWithoutAnimation(m_scrollableArea->minim umScrollPosition() + toIntSize(m_layer->layer()->scrollPosition())); 1316 m_scrollableArea->scrollToOffsetWithoutAnimation(m_scrollableArea->minim umScrollPosition() + toIntSize(m_layer->layer()->scrollPosition()));
1307 } 1317 }
1308 1318
1309 } // namespace WebCore 1319 } // namespace WebCore
1310 1320
1311 #ifndef NDEBUG 1321 #ifndef NDEBUG
1312 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) 1322 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer)
1313 { 1323 {
1314 if (!layer) 1324 if (!layer)
1315 return; 1325 return;
1316 1326
1317 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); 1327 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo);
1318 fprintf(stderr, "%s\n", output.utf8().data()); 1328 fprintf(stderr, "%s\n", output.utf8().data());
1319 } 1329 }
1320 #endif 1330 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698