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

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

Issue 1497873002: Make DisplayItemClient an interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 return; 837 return;
838 838
839 m_size = clampedSize; 839 m_size = clampedSize;
840 840
841 m_layer->layer()->setBounds(flooredIntSize(m_size)); 841 m_layer->layer()->setBounds(flooredIntSize(m_size));
842 // Note that we don't resize m_contentsLayer. It's up the caller to do that. 842 // Note that we don't resize m_contentsLayer. It's up the caller to do that.
843 843
844 #ifndef NDEBUG 844 #ifndef NDEBUG
845 // The red debug fill needs to be invalidated if the layer resizes. 845 // The red debug fill needs to be invalidated if the layer resizes.
846 if (m_paintController) 846 if (m_paintController)
847 m_paintController->invalidateUntracked(displayItemClient()); 847 m_paintController->invalidateUntracked(*this);
848 #endif 848 #endif
849 } 849 }
850 850
851 void GraphicsLayer::setTransform(const TransformationMatrix& transform) 851 void GraphicsLayer::setTransform(const TransformationMatrix& transform)
852 { 852 {
853 m_transform = transform; 853 m_transform = transform;
854 platformLayer()->setTransform(TransformationMatrix::toSkMatrix44(m_transform )); 854 platformLayer()->setTransform(TransformationMatrix::toSkMatrix44(m_transform ));
855 } 855 }
856 856
857 void GraphicsLayer::setTransformOrigin(const FloatPoint3D& transformOrigin) 857 void GraphicsLayer::setTransformOrigin(const FloatPoint3D& transformOrigin)
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 1038
1039 m_layer->layer()->invalidateRect(rect); 1039 m_layer->layer()->invalidateRect(rect);
1040 if (firstPaintInvalidationTrackingEnabled()) 1040 if (firstPaintInvalidationTrackingEnabled())
1041 m_debugInfo.appendAnnotatedInvalidateRect(rect, invalidationReason); 1041 m_debugInfo.appendAnnotatedInvalidateRect(rect, invalidationReason);
1042 if (isTrackingPaintInvalidations()) 1042 if (isTrackingPaintInvalidations())
1043 trackPaintInvalidationRect(rect); 1043 trackPaintInvalidationRect(rect);
1044 for (size_t i = 0; i < m_linkHighlights.size(); ++i) 1044 for (size_t i = 0; i < m_linkHighlights.size(); ++i)
1045 m_linkHighlights[i]->invalidate(); 1045 m_linkHighlights[i]->invalidate();
1046 } 1046 }
1047 1047
1048 void GraphicsLayer::invalidateDisplayItemClient(const DisplayItemClientWrapper& displayItemClient, PaintInvalidationReason paintInvalidationReason, const IntRec t* visualRect) 1048 void GraphicsLayer::invalidateDisplayItemClient(const DisplayItemClient& display ItemClient, PaintInvalidationReason paintInvalidationReason, const IntRect* visu alRect)
1049 { 1049 {
1050 paintController()->invalidate(displayItemClient, paintInvalidationReason, vi sualRect); 1050 paintController()->invalidate(displayItemClient, paintInvalidationReason, vi sualRect);
1051 if (isTrackingPaintInvalidations()) 1051 if (isTrackingPaintInvalidations())
1052 trackPaintInvalidationObject(displayItemClient.debugName()); 1052 trackPaintInvalidationObject(displayItemClient.debugName());
1053 } 1053 }
1054 1054
1055 void GraphicsLayer::setContentsRect(const IntRect& rect) 1055 void GraphicsLayer::setContentsRect(const IntRect& rect)
1056 { 1056 {
1057 if (rect == m_contentsRect) 1057 if (rect == m_contentsRect)
1058 return; 1058 return;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 { 1235 {
1236 if (!layer) { 1236 if (!layer) {
1237 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1237 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1238 return; 1238 return;
1239 } 1239 }
1240 1240
1241 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1241 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1242 fprintf(stderr, "%s\n", output.utf8().data()); 1242 fprintf(stderr, "%s\n", output.utf8().data());
1243 } 1243 }
1244 #endif 1244 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.h ('k') | third_party/WebKit/Source/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698