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 blink; | |
44 | |
45 namespace blink { | 43 namespace blink { |
46 | 44 |
47 void toWebTransformOperations(const TransformOperations& transformOperations, We
bTransformOperations* webTransformOperations) | 45 void toWebTransformOperations(const TransformOperations& transformOperations, We
bTransformOperations* webTransformOperations) |
48 { | 46 { |
49 // We need to do a deep copy the transformOperations may contain ref pointer
s to TransformOperation objects. | 47 // 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) { | 48 for (size_t j = 0; j < transformOperations.size(); ++j) { |
51 switch (transformOperations.operations()[j]->type()) { | 49 switch (transformOperations.operations()[j]->type()) { |
52 case TransformOperation::ScaleX: | 50 case TransformOperation::ScaleX: |
53 case TransformOperation::ScaleY: | 51 case TransformOperation::ScaleY: |
54 case TransformOperation::ScaleZ: | 52 case TransformOperation::ScaleZ: |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 116 |
119 void toWebFilterOperations(const FilterOperations& inOperations, WebFilterOperat
ions* outOperations) | 117 void toWebFilterOperations(const FilterOperations& inOperations, WebFilterOperat
ions* outOperations) |
120 { | 118 { |
121 SkiaImageFilterBuilder builder; | 119 SkiaImageFilterBuilder builder; |
122 FilterOutsets outsets = inOperations.outsets(); | 120 FilterOutsets outsets = inOperations.outsets(); |
123 builder.setCropOffset(FloatSize(outsets.left(), outsets.top())); | 121 builder.setCropOffset(FloatSize(outsets.left(), outsets.top())); |
124 builder.buildFilterOperations(inOperations, outOperations); | 122 builder.buildFilterOperations(inOperations, outOperations); |
125 } | 123 } |
126 | 124 |
127 } // namespace blink | 125 } // namespace blink |
OLD | NEW |