OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 22 matching lines...) Expand all Loading... |
33 #include "platform/transforms/MatrixTransformOperation.h" | 33 #include "platform/transforms/MatrixTransformOperation.h" |
34 #include "platform/transforms/PerspectiveTransformOperation.h" | 34 #include "platform/transforms/PerspectiveTransformOperation.h" |
35 #include "platform/transforms/RotateTransformOperation.h" | 35 #include "platform/transforms/RotateTransformOperation.h" |
36 #include "platform/transforms/ScaleTransformOperation.h" | 36 #include "platform/transforms/ScaleTransformOperation.h" |
37 #include "platform/transforms/SkewTransformOperation.h" | 37 #include "platform/transforms/SkewTransformOperation.h" |
38 #include "platform/transforms/TransformOperations.h" | 38 #include "platform/transforms/TransformOperations.h" |
39 #include "platform/transforms/TransformationMatrix.h" | 39 #include "platform/transforms/TransformationMatrix.h" |
40 #include "platform/transforms/TranslateTransformOperation.h" | 40 #include "platform/transforms/TranslateTransformOperation.h" |
41 #include "public/platform/WebTransformOperations.h" | 41 #include "public/platform/WebTransformOperations.h" |
42 | 42 |
| 43 using namespace std; |
43 using namespace blink; | 44 using namespace blink; |
44 | 45 |
45 namespace WebCore { | 46 namespace WebCore { |
46 | 47 |
47 void toWebTransformOperations(const TransformOperations& transformOperations, We
bTransformOperations* webTransformOperations) | 48 void toWebTransformOperations(const TransformOperations& transformOperations, We
bTransformOperations* webTransformOperations) |
48 { | 49 { |
49 // We need to do a deep copy the transformOperations may contain ref pointer
s to TransformOperation objects. | 50 // We need to do a deep copy the transformOperations may contain ref pointer
s to TransformOperation objects. |
50 for (size_t j = 0; j < transformOperations.size(); ++j) { | 51 for (size_t j = 0; j < transformOperations.size(); ++j) { |
51 switch (transformOperations.operations()[j]->type()) { | 52 switch (transformOperations.operations()[j]->type()) { |
52 case TransformOperation::ScaleX: | 53 case TransformOperation::ScaleX: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 119 |
119 bool toWebFilterOperations(const FilterOperations& inOperations, WebFilterOperat
ions* outOperations) | 120 bool toWebFilterOperations(const FilterOperations& inOperations, WebFilterOperat
ions* outOperations) |
120 { | 121 { |
121 SkiaImageFilterBuilder builder; | 122 SkiaImageFilterBuilder builder; |
122 FilterOutsets outsets = inOperations.outsets(); | 123 FilterOutsets outsets = inOperations.outsets(); |
123 builder.setCropOffset(FloatSize(outsets.left(), outsets.top())); | 124 builder.setCropOffset(FloatSize(outsets.left(), outsets.top())); |
124 return builder.buildFilterOperations(inOperations, outOperations); | 125 return builder.buildFilterOperations(inOperations, outOperations); |
125 } | 126 } |
126 | 127 |
127 } // namespace WebCore | 128 } // namespace WebCore |
OLD | NEW |