| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 } | 527 } |
| 528 | 528 |
| 529 void HTMLCanvasElement::Paint(GraphicsContext& context, const LayoutRect& r) { | 529 void HTMLCanvasElement::Paint(GraphicsContext& context, const LayoutRect& r) { |
| 530 // FIXME: crbug.com/438240; there is a bug with the new CSS blending and | 530 // FIXME: crbug.com/438240; there is a bug with the new CSS blending and |
| 531 // compositing feature. | 531 // compositing feature. |
| 532 if (!context_ && !PlaceholderFrame()) | 532 if (!context_ && !PlaceholderFrame()) |
| 533 return; | 533 return; |
| 534 | 534 |
| 535 const ComputedStyle* style = EnsureComputedStyle(); | 535 const ComputedStyle* style = EnsureComputedStyle(); |
| 536 SkFilterQuality filter_quality = | 536 SkFilterQuality filter_quality = |
| 537 (style && style->ImageRendering() == kImageRenderingPixelated) | 537 (style && style->ImageRendering() == EImageRendering::kPixelated) |
| 538 ? kNone_SkFilterQuality | 538 ? kNone_SkFilterQuality |
| 539 : kLow_SkFilterQuality; | 539 : kLow_SkFilterQuality; |
| 540 | 540 |
| 541 if (Is3d()) { | 541 if (Is3d()) { |
| 542 context_->SetFilterQuality(filter_quality); | 542 context_->SetFilterQuality(filter_quality); |
| 543 } else if (GetImageBuffer()) { | 543 } else if (GetImageBuffer()) { |
| 544 image_buffer_->SetFilterQuality(filter_quality); | 544 image_buffer_->SetFilterQuality(filter_quality); |
| 545 } | 545 } |
| 546 | 546 |
| 547 if (GetImageBuffer() && !image_buffer_is_clear_) | 547 if (GetImageBuffer() && !image_buffer_is_clear_) |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 // Creates a placeholder layer first before Surface is created. | 1430 // Creates a placeholder layer first before Surface is created. |
| 1431 surface_layer_bridge_->CreateSolidColorLayer(); | 1431 surface_layer_bridge_->CreateSolidColorLayer(); |
| 1432 } | 1432 } |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 void HTMLCanvasElement::OnWebLayerReplaced() { | 1435 void HTMLCanvasElement::OnWebLayerReplaced() { |
| 1436 SetNeedsCompositingUpdate(); | 1436 SetNeedsCompositingUpdate(); |
| 1437 } | 1437 } |
| 1438 | 1438 |
| 1439 } // namespace blink | 1439 } // namespace blink |
| OLD | NEW |