| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
| 8 | 8 |
| 9 #include "CCRenderSurfaceFilters.h" | 9 #include "CCRenderSurfaceFilters.h" |
| 10 | 10 |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 SkAutoTUnref<SkImageFilter> zoomFilter( | 413 SkAutoTUnref<SkImageFilter> zoomFilter( |
| 414 new SkMagnifierImageFilter( | 414 new SkMagnifierImageFilter( |
| 415 SkRect::MakeXYWH(op.zoomRect().x, | 415 SkRect::MakeXYWH(op.zoomRect().x, |
| 416 op.zoomRect().y, | 416 op.zoomRect().y, |
| 417 op.zoomRect().width, | 417 op.zoomRect().width, |
| 418 op.zoomRect().height), | 418 op.zoomRect().height), |
| 419 op.amount())); | 419 op.amount())); |
| 420 paint.setImageFilter(zoomFilter.get()); | 420 paint.setImageFilter(zoomFilter.get()); |
| 421 canvas->saveLayer(0, &paint); | 421 canvas->saveLayer(0, &paint); |
| 422 canvas->drawBitmap(state.source(), 0, 0); | 422 canvas->drawBitmap(state.source(), 0, 0); |
| 423 canvas->restore(); |
| 423 break; | 424 break; |
| 424 } | 425 } |
| 425 case WebKit::WebFilterOperation::FilterTypeBrightness: | 426 case WebKit::WebFilterOperation::FilterTypeBrightness: |
| 426 case WebKit::WebFilterOperation::FilterTypeContrast: | 427 case WebKit::WebFilterOperation::FilterTypeContrast: |
| 427 case WebKit::WebFilterOperation::FilterTypeGrayscale: | 428 case WebKit::WebFilterOperation::FilterTypeGrayscale: |
| 428 case WebKit::WebFilterOperation::FilterTypeSepia: | 429 case WebKit::WebFilterOperation::FilterTypeSepia: |
| 429 case WebKit::WebFilterOperation::FilterTypeSaturate: | 430 case WebKit::WebFilterOperation::FilterTypeSaturate: |
| 430 case WebKit::WebFilterOperation::FilterTypeHueRotate: | 431 case WebKit::WebFilterOperation::FilterTypeHueRotate: |
| 431 case WebKit::WebFilterOperation::FilterTypeInvert: | 432 case WebKit::WebFilterOperation::FilterTypeInvert: |
| 432 case WebKit::WebFilterOperation::FilterTypeOpacity: | 433 case WebKit::WebFilterOperation::FilterTypeOpacity: |
| 433 ASSERT_NOT_REACHED(); | 434 ASSERT_NOT_REACHED(); |
| 434 break; | 435 break; |
| 435 } | 436 } |
| 436 state.swap(); | 437 state.swap(); |
| 437 } | 438 } |
| 438 context3D->flush(); | 439 context3D->flush(); |
| 439 return state.source(); | 440 return state.source(); |
| 440 } | 441 } |
| 441 | 442 |
| 442 } | 443 } |
| 443 #endif // USE(ACCELERATED_COMPOSITING) | 444 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |