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

Side by Side Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 341213002: Redraw only dirty area for accelerated 2D Canvas. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: New patch with cleanup applied Created 6 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
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | no next file » | 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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 return false; 1700 return false;
1701 } 1701 }
1702 1702
1703 void CompositedLayerMapping::contentChanged(ContentChangeType changeType) 1703 void CompositedLayerMapping::contentChanged(ContentChangeType changeType)
1704 { 1704 {
1705 if ((changeType == ImageChanged) && isDirectlyCompositedImage()) { 1705 if ((changeType == ImageChanged) && isDirectlyCompositedImage()) {
1706 updateImageContents(); 1706 updateImageContents();
1707 return; 1707 return;
1708 } 1708 }
1709 1709
1710 if ((changeType == CanvasChanged || changeType == CanvasPixelsChanged) && is AcceleratedCanvas(renderer())) { 1710 if (changeType == CanvasChanged && isAcceleratedCanvas(renderer())) {
1711 m_graphicsLayer->setContentsNeedsDisplay(); 1711 m_graphicsLayer->setContentsNeedsDisplay();
1712 return; 1712 return;
1713 } 1713 }
1714 } 1714 }
1715 1715
1716 void CompositedLayerMapping::updateImageContents() 1716 void CompositedLayerMapping::updateImageContents()
1717 { 1717 {
1718 ASSERT(renderer()->isImage()); 1718 ASSERT(renderer()->isImage());
1719 RenderImage* imageRenderer = toRenderImage(renderer()); 1719 RenderImage* imageRenderer = toRenderImage(renderer());
1720 1720
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2231 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2232 name = "Scrolling Block Selection Layer"; 2232 name = "Scrolling Block Selection Layer";
2233 } else { 2233 } else {
2234 ASSERT_NOT_REACHED(); 2234 ASSERT_NOT_REACHED();
2235 } 2235 }
2236 2236
2237 return name; 2237 return name;
2238 } 2238 }
2239 2239
2240 } // namespace WebCore 2240 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698