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

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

Issue 763493003: Track scissored damage area for WebGL Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 if (!cachedImage->hasImage()) 1823 if (!cachedImage->hasImage())
1824 return false; 1824 return false;
1825 1825
1826 Image* image = cachedImage->imageForRenderer(imageRenderer); 1826 Image* image = cachedImage->imageForRenderer(imageRenderer);
1827 return image->isBitmapImage(); 1827 return image->isBitmapImage();
1828 } 1828 }
1829 1829
1830 return false; 1830 return false;
1831 } 1831 }
1832 1832
1833 void CompositedLayerMapping::contentChanged(ContentChangeType changeType) 1833 void CompositedLayerMapping::contentChanged(ContentChangeType changeType, const IntRect& dirtyRect)
1834 { 1834 {
1835 if ((changeType == ImageChanged) && renderer()->isImage() && isDirectlyCompo sitedImage()) { 1835 if ((changeType == ImageChanged) && renderer()->isImage() && isDirectlyCompo sitedImage()) {
1836 updateImageContents(); 1836 updateImageContents();
1837 return; 1837 return;
1838 } 1838 }
1839 1839
1840 if (changeType == CanvasChanged && isAcceleratedCanvas(renderer())) { 1840 if (changeType == CanvasChanged && isAcceleratedCanvas(renderer())) {
1841 m_graphicsLayer->setContentsNeedsDisplay(); 1841 m_graphicsLayer->setContentsNeedsDisplay(dirtyRect);
1842 return; 1842 return;
1843 } 1843 }
1844 } 1844 }
1845 1845
1846 void CompositedLayerMapping::updateImageContents() 1846 void CompositedLayerMapping::updateImageContents()
1847 { 1847 {
1848 ASSERT(renderer()->isImage()); 1848 ASSERT(renderer()->isImage());
1849 RenderImage* imageRenderer = toRenderImage(renderer()); 1849 RenderImage* imageRenderer = toRenderImage(renderer());
1850 1850
1851 ImageResource* cachedImage = imageRenderer->cachedImage(); 1851 ImageResource* cachedImage = imageRenderer->cachedImage();
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2313 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2314 name = "Scrolling Block Selection Layer"; 2314 name = "Scrolling Block Selection Layer";
2315 } else { 2315 } else {
2316 ASSERT_NOT_REACHED(); 2316 ASSERT_NOT_REACHED();
2317 } 2317 }
2318 2318
2319 return name; 2319 return name;
2320 } 2320 }
2321 2321
2322 } // namespace blink 2322 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.h ('k') | Source/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698