| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/render_surface_filters.h" | 5 #include "cc/render_surface_filters.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "skia/ext/refptr.h" | 8 #include "skia/ext/refptr.h" |
| 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperation.
h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" |
| 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 9 #include "third_party/skia/include/core/SkCanvas.h" | 12 #include "third_party/skia/include/core/SkCanvas.h" |
| 10 #include "third_party/skia/include/effects/SkBlurImageFilter.h" | 13 #include "third_party/skia/include/effects/SkBlurImageFilter.h" |
| 11 #include "third_party/skia/include/effects/SkColorMatrixFilter.h" | 14 #include "third_party/skia/include/effects/SkColorMatrixFilter.h" |
| 12 #include "third_party/skia/include/effects/SkMagnifierImageFilter.h" | 15 #include "third_party/skia/include/effects/SkMagnifierImageFilter.h" |
| 13 #include "third_party/skia/include/gpu/SkGpuDevice.h" | 16 #include "third_party/skia/include/gpu/SkGpuDevice.h" |
| 14 #include "third_party/skia/include/gpu/SkGrPixelRef.h" | 17 #include "third_party/skia/include/gpu/SkGrPixelRef.h" |
| 15 #include "ui/gfx/size_f.h" | 18 #include "ui/gfx/size_f.h" |
| 16 #include <public/WebFilterOperation.h> | |
| 17 #include <public/WebFilterOperations.h> | |
| 18 #include <public/WebGraphicsContext3D.h> | |
| 19 | 19 |
| 20 namespace cc { | 20 namespace cc { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 void getBrightnessMatrix(float amount, SkScalar matrix[20]) | 24 void getBrightnessMatrix(float amount, SkScalar matrix[20]) |
| 25 { | 25 { |
| 26 memset(matrix, 0, 20 * sizeof(SkScalar)); | 26 memset(matrix, 0, 20 * sizeof(SkScalar)); |
| 27 // Old implementation, a la the draft spec, a straight-up scale, | 27 // Old implementation, a la the draft spec, a straight-up scale, |
| 28 // representing <feFunc[R|G|B] type="linear" slope="[amount]"> | 28 // representing <feFunc[R|G|B] type="linear" slope="[amount]"> |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 NOTREACHED(); | 436 NOTREACHED(); |
| 437 break; | 437 break; |
| 438 } | 438 } |
| 439 state.swap(); | 439 state.swap(); |
| 440 } | 440 } |
| 441 context3D->flush(); | 441 context3D->flush(); |
| 442 return state.source(); | 442 return state.source(); |
| 443 } | 443 } |
| 444 | 444 |
| 445 } // namespace cc | 445 } // namespace cc |
| OLD | NEW |