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

Side by Side Diff: WebCore/rendering/RenderLayer.cpp

Issue 5523003: Part 1 of merges for Chromium bug #64589... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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 | « WebCore/rendering/RenderLayer.h ('k') | WebCore/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 bool RenderLayer::hasAcceleratedCompositing() const 243 bool RenderLayer::hasAcceleratedCompositing() const
244 { 244 {
245 #if USE(ACCELERATED_COMPOSITING) 245 #if USE(ACCELERATED_COMPOSITING)
246 return compositor()->hasAcceleratedCompositing(); 246 return compositor()->hasAcceleratedCompositing();
247 #else 247 #else
248 return false; 248 return false;
249 #endif 249 #endif
250 } 250 }
251 251
252 bool RenderLayer::canRender3DTransforms() const
253 {
254 #if USE(ACCELERATED_COMPOSITING)
255 return compositor()->canRender3DTransforms();
256 #else
257 return false;
258 #endif
259 }
260
252 void RenderLayer::updateLayerPositions(UpdateLayerPositionsFlags flags, IntPoint * cachedOffset) 261 void RenderLayer::updateLayerPositions(UpdateLayerPositionsFlags flags, IntPoint * cachedOffset)
253 { 262 {
254 if (flags & DoFullRepaint) { 263 if (flags & DoFullRepaint) {
255 renderer()->repaint(); 264 renderer()->repaint();
256 #if USE(ACCELERATED_COMPOSITING) 265 #if USE(ACCELERATED_COMPOSITING)
257 flags &= ~CheckForRepaint; 266 flags &= ~CheckForRepaint;
258 // We need the full repaint to propagate to child layers if we are hardw are compositing. 267 // We need the full repaint to propagate to child layers if we are hardw are compositing.
259 if (!compositor()->inCompositingMode()) 268 if (!compositor()->inCompositingMode())
260 flags &= ~DoFullRepaint; 269 flags &= ~DoFullRepaint;
261 #else 270 #else
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 m_transform.set(new TransformationMatrix); 431 m_transform.set(new TransformationMatrix);
423 else 432 else
424 m_transform.clear(); 433 m_transform.clear();
425 } 434 }
426 435
427 if (hasTransform) { 436 if (hasTransform) {
428 RenderBox* box = renderBox(); 437 RenderBox* box = renderBox();
429 ASSERT(box); 438 ASSERT(box);
430 m_transform->makeIdentity(); 439 m_transform->makeIdentity();
431 box->style()->applyTransform(*m_transform, box->borderBoxRect().size(), RenderStyle::IncludeTransformOrigin); 440 box->style()->applyTransform(*m_transform, box->borderBoxRect().size(), RenderStyle::IncludeTransformOrigin);
432 makeMatrixRenderable(*m_transform, hasAcceleratedCompositing()); 441 makeMatrixRenderable(*m_transform, canRender3DTransforms());
433 } 442 }
434 443
435 if (had3DTransform != has3DTransform()) 444 if (had3DTransform != has3DTransform())
436 dirty3DTransformedDescendantStatus(); 445 dirty3DTransformedDescendantStatus();
437 } 446 }
438 447
439 TransformationMatrix RenderLayer::currentTransform() const 448 TransformationMatrix RenderLayer::currentTransform() const
440 { 449 {
441 if (!m_transform) 450 if (!m_transform)
442 return TransformationMatrix(); 451 return TransformationMatrix();
443 452
444 #if USE(ACCELERATED_COMPOSITING) 453 #if USE(ACCELERATED_COMPOSITING)
445 if (renderer()->style()->isRunningAcceleratedAnimation()) { 454 if (renderer()->style()->isRunningAcceleratedAnimation()) {
446 TransformationMatrix currTransform; 455 TransformationMatrix currTransform;
447 RefPtr<RenderStyle> style = renderer()->animation()->getAnimatedStyleFor Renderer(renderer()); 456 RefPtr<RenderStyle> style = renderer()->animation()->getAnimatedStyleFor Renderer(renderer());
448 style->applyTransform(currTransform, renderBox()->borderBoxRect().size() , RenderStyle::IncludeTransformOrigin); 457 style->applyTransform(currTransform, renderBox()->borderBoxRect().size() , RenderStyle::IncludeTransformOrigin);
449 makeMatrixRenderable(currTransform, hasAcceleratedCompositing()); 458 makeMatrixRenderable(currTransform, canRender3DTransforms());
450 return currTransform; 459 return currTransform;
451 } 460 }
452 #endif 461 #endif
453 462
454 return *m_transform; 463 return *m_transform;
455 } 464 }
456 465
457 TransformationMatrix RenderLayer::renderableTransform(PaintBehavior paintBehavio r) const 466 TransformationMatrix RenderLayer::renderableTransform(PaintBehavior paintBehavio r) const
458 { 467 {
459 if (!m_transform) 468 if (!m_transform)
(...skipping 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after
3929 } 3938 }
3930 } 3939 }
3931 3940
3932 void showLayerTree(const WebCore::RenderObject* renderer) 3941 void showLayerTree(const WebCore::RenderObject* renderer)
3933 { 3942 {
3934 if (!renderer) 3943 if (!renderer)
3935 return; 3944 return;
3936 showLayerTree(renderer->enclosingLayer()); 3945 showLayerTree(renderer->enclosingLayer());
3937 } 3946 }
3938 #endif 3947 #endif
OLDNEW
« no previous file with comments | « WebCore/rendering/RenderLayer.h ('k') | WebCore/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698