OLD | NEW |
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 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 | 27 |
28 #include "GraphicsLayer.h" | 28 #include "GraphicsLayer.h" |
29 | 29 |
30 #include "FloatPoint.h" | 30 #include "FloatPoint.h" |
31 #include "FloatRect.h" | 31 #include "FloatRect.h" |
32 #include "GraphicsContext.h" | 32 #include "GraphicsContext.h" |
33 #include "LayoutRect.h" | 33 #include "LayoutRect.h" |
34 #include "PlatformMemoryInstrumentation.h" | |
35 #include "RotateTransformOperation.h" | 34 #include "RotateTransformOperation.h" |
36 #include "TextStream.h" | 35 #include "TextStream.h" |
37 #include <wtf/HashMap.h> | 36 #include <wtf/HashMap.h> |
38 #include <wtf/MemoryInstrumentationVector.h> | |
39 #include <wtf/text/CString.h> | 37 #include <wtf/text/CString.h> |
40 #include <wtf/text/StringBuilder.h> | 38 #include <wtf/text/StringBuilder.h> |
41 #include <wtf/text/WTFString.h> | 39 #include <wtf/text/WTFString.h> |
42 | 40 |
43 #ifndef NDEBUG | 41 #ifndef NDEBUG |
44 #include <stdio.h> | 42 #include <stdio.h> |
45 #endif | 43 #endif |
46 | 44 |
47 namespace WebCore { | 45 namespace WebCore { |
48 | 46 |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 } | 728 } |
731 | 729 |
732 String GraphicsLayer::layerTreeAsText(LayerTreeAsTextBehavior behavior) const | 730 String GraphicsLayer::layerTreeAsText(LayerTreeAsTextBehavior behavior) const |
733 { | 731 { |
734 TextStream ts; | 732 TextStream ts; |
735 | 733 |
736 dumpLayer(ts, 0, behavior); | 734 dumpLayer(ts, 0, behavior); |
737 return ts.release(); | 735 return ts.release(); |
738 } | 736 } |
739 | 737 |
740 void GraphicsLayer::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | |
741 { | |
742 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Layers); | |
743 info.addMember(m_children, "children"); | |
744 info.addMember(m_parent, "parent"); | |
745 info.addMember(m_maskLayer, "maskLayer"); | |
746 info.addMember(m_replicaLayer, "replicaLayer"); | |
747 info.addMember(m_replicatedLayer, "replicatedLayer"); | |
748 info.ignoreMember(m_client); | |
749 info.addMember(m_name, "name"); | |
750 } | |
751 | |
752 } // namespace WebCore | 738 } // namespace WebCore |
753 | 739 |
754 #ifndef NDEBUG | 740 #ifndef NDEBUG |
755 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 741 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
756 { | 742 { |
757 if (!layer) | 743 if (!layer) |
758 return; | 744 return; |
759 | 745 |
760 String output = layer->layerTreeAsText(LayerTreeAsTextDebug | LayerTreeAsTex
tIncludeVisibleRects); | 746 String output = layer->layerTreeAsText(LayerTreeAsTextDebug | LayerTreeAsTex
tIncludeVisibleRects); |
761 fprintf(stderr, "%s\n", output.utf8().data()); | 747 fprintf(stderr, "%s\n", output.utf8().data()); |
762 } | 748 } |
763 #endif | 749 #endif |
OLD | NEW |