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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "wtf/MemoryInstrumentationHashMap.h" | 48 #include "wtf/MemoryInstrumentationHashMap.h" |
49 #include "wtf/MemoryInstrumentationVector.h" | 49 #include "wtf/MemoryInstrumentationVector.h" |
50 #include "wtf/StringExtras.h" | 50 #include "wtf/StringExtras.h" |
51 #include "wtf/text/CString.h" | 51 #include "wtf/text/CString.h" |
52 #include "wtf/text/StringBuilder.h" | 52 #include "wtf/text/StringBuilder.h" |
53 #include "wtf/text/StringHash.h" | 53 #include "wtf/text/StringHash.h" |
54 #include "wtf/text/WTFString.h" | 54 #include "wtf/text/WTFString.h" |
55 | 55 |
56 #include <public/Platform.h> | 56 #include <public/Platform.h> |
57 #include <public/WebAnimation.h> | 57 #include <public/WebAnimation.h> |
| 58 #include <public/WebCompositingReasons.h> |
58 #include <public/WebCompositorSupport.h> | 59 #include <public/WebCompositorSupport.h> |
59 #include <public/WebFilterOperation.h> | 60 #include <public/WebFilterOperation.h> |
60 #include <public/WebFilterOperations.h> | 61 #include <public/WebFilterOperations.h> |
61 #include <public/WebFloatPoint.h> | 62 #include <public/WebFloatPoint.h> |
62 #include <public/WebFloatRect.h> | 63 #include <public/WebFloatRect.h> |
63 #include <public/WebPoint.h> | 64 #include <public/WebPoint.h> |
64 #include <public/WebSize.h> | 65 #include <public/WebSize.h> |
65 | 66 |
66 #ifndef NDEBUG | 67 #ifndef NDEBUG |
67 #include <stdio.h> | 68 #include <stdio.h> |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 m_name = String::format("GraphicsLayer(%p) ", this) + name; | 1063 m_name = String::format("GraphicsLayer(%p) ", this) + name; |
1063 updateNames(); | 1064 updateNames(); |
1064 } | 1065 } |
1065 | 1066 |
1066 int GraphicsLayer::debugID() const | 1067 int GraphicsLayer::debugID() const |
1067 { | 1068 { |
1068 // FIXME: change this to assert m_layer always exists, and remove enum. | 1069 // FIXME: change this to assert m_layer always exists, and remove enum. |
1069 return m_layer ? m_layer->layer()->id() : DebugIDNoCompositedLayer; | 1070 return m_layer ? m_layer->layer()->id() : DebugIDNoCompositedLayer; |
1070 } | 1071 } |
1071 | 1072 |
| 1073 void GraphicsLayer::setCompositingReasons(CompositingReasons reasons) |
| 1074 { |
| 1075 WebKit::WebCompositingReasons webReasons = reasons; |
| 1076 m_layer->layer()->setCompositingReasons(webReasons); |
| 1077 } |
| 1078 |
1072 void GraphicsLayer::setPosition(const FloatPoint& point) | 1079 void GraphicsLayer::setPosition(const FloatPoint& point) |
1073 { | 1080 { |
1074 m_position = point; | 1081 m_position = point; |
1075 updateLayerPosition(); | 1082 updateLayerPosition(); |
1076 } | 1083 } |
1077 | 1084 |
1078 void GraphicsLayer::setAnchorPoint(const FloatPoint3D& point) | 1085 void GraphicsLayer::setAnchorPoint(const FloatPoint3D& point) |
1079 { | 1086 { |
1080 m_anchorPoint = point; | 1087 m_anchorPoint = point; |
1081 updateAnchorPoint(); | 1088 updateAnchorPoint(); |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 #ifndef NDEBUG | 1449 #ifndef NDEBUG |
1443 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1450 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
1444 { | 1451 { |
1445 if (!layer) | 1452 if (!layer) |
1446 return; | 1453 return; |
1447 | 1454 |
1448 String output = layer->layerTreeAsText(LayerTreeAsTextDebug | LayerTreeAsTex
tIncludeVisibleRects); | 1455 String output = layer->layerTreeAsText(LayerTreeAsTextDebug | LayerTreeAsTex
tIncludeVisibleRects); |
1449 fprintf(stderr, "%s\n", output.utf8().data()); | 1456 fprintf(stderr, "%s\n", output.utf8().data()); |
1450 } | 1457 } |
1451 #endif | 1458 #endif |
OLD | NEW |