| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return; | 93 return; |
| 94 | 94 |
| 95 layer()->contentChanged(changeType); | 95 layer()->contentChanged(changeType); |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool RenderBoxModelObject::hasAcceleratedCompositing() const | 98 bool RenderBoxModelObject::hasAcceleratedCompositing() const |
| 99 { | 99 { |
| 100 return view()->compositor()->hasAcceleratedCompositing(); | 100 return view()->compositor()->hasAcceleratedCompositing(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 bool RenderBoxModelObject::shouldPaintAtLowQuality(GraphicsContext* context, Ima
ge* image, const void* layer, const LayoutSize& size) | 103 InterpolationQuality RenderBoxModelObject::chooseInterpolationQuality(GraphicsCo
ntext* context, Image* image, const void* layer, const LayoutSize& size) |
| 104 { | 104 { |
| 105 return ImageQualityController::imageQualityController()->shouldPaintAtLowQua
lity(context, this, image, layer, size); | 105 return ImageQualityController::imageQualityController()->chooseInterpolation
Quality(context, this, image, layer, size); |
| 106 } | 106 } |
| 107 | 107 |
| 108 RenderBoxModelObject::RenderBoxModelObject(ContainerNode* node) | 108 RenderBoxModelObject::RenderBoxModelObject(ContainerNode* node) |
| 109 : RenderLayerModelObject(node) | 109 : RenderLayerModelObject(node) |
| 110 { | 110 { |
| 111 } | 111 } |
| 112 | 112 |
| 113 RenderBoxModelObject::~RenderBoxModelObject() | 113 RenderBoxModelObject::~RenderBoxModelObject() |
| 114 { | 114 { |
| 115 ImageQualityController::remove(this); | 115 ImageQualityController::remove(this); |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 | 695 |
| 696 // no progressive loading of the background image | 696 // no progressive loading of the background image |
| 697 if (shouldPaintBackgroundImage) { | 697 if (shouldPaintBackgroundImage) { |
| 698 BackgroundImageGeometry geometry; | 698 BackgroundImageGeometry geometry; |
| 699 calculateBackgroundImageGeometry(bgLayer, scrolledPaintRect, geometry, b
ackgroundObject); | 699 calculateBackgroundImageGeometry(bgLayer, scrolledPaintRect, geometry, b
ackgroundObject); |
| 700 geometry.clip(paintInfo.rect); | 700 geometry.clip(paintInfo.rect); |
| 701 if (!geometry.destRect().isEmpty()) { | 701 if (!geometry.destRect().isEmpty()) { |
| 702 CompositeOperator compositeOp = op == CompositeSourceOver ? bgLayer-
>composite() : op; | 702 CompositeOperator compositeOp = op == CompositeSourceOver ? bgLayer-
>composite() : op; |
| 703 RenderObject* clientForBackgroundImage = backgroundObject ? backgrou
ndObject : this; | 703 RenderObject* clientForBackgroundImage = backgroundObject ? backgrou
ndObject : this; |
| 704 RefPtr<Image> image = bgImage->image(clientForBackgroundImage, geome
try.tileSize()); | 704 RefPtr<Image> image = bgImage->image(clientForBackgroundImage, geome
try.tileSize()); |
| 705 bool useLowQualityScaling = shouldPaintAtLowQuality(context, image.g
et(), bgLayer, geometry.tileSize()); | 705 InterpolationQuality interpolationQuality = chooseInterpolationQuali
ty(context, image.get(), bgLayer, geometry.tileSize()); |
| 706 if (bgLayer->maskSourceType() == MaskLuminance) | 706 if (bgLayer->maskSourceType() == MaskLuminance) |
| 707 context->setColorFilter(ColorFilterLuminanceToAlpha); | 707 context->setColorFilter(ColorFilterLuminanceToAlpha); |
| 708 context->drawTiledImage(image.get(), geometry.destRect(), geometry.r
elativePhase(), geometry.tileSize(), | 708 context->drawTiledImage(image.get(), geometry.destRect(), geometry.r
elativePhase(), geometry.tileSize(), |
| 709 compositeOp, useLowQualityScaling, bgLayer->blendMode(), geometr
y.spaceSize()); | 709 compositeOp, interpolationQuality, bgLayer->blendMode(), geometr
y.spaceSize()); |
| 710 } | 710 } |
| 711 } | 711 } |
| 712 | 712 |
| 713 if (bgLayer->clip() == TextFillBox) { | 713 if (bgLayer->clip() == TextFillBox) { |
| 714 // Create the text mask layer. | 714 // Create the text mask layer. |
| 715 context->setCompositeOperation(CompositeDestinationIn); | 715 context->setCompositeOperation(CompositeDestinationIn); |
| 716 context->beginTransparencyLayer(1); | 716 context->beginTransparencyLayer(1); |
| 717 | 717 |
| 718 // FIXME: Workaround for https://code.google.com/p/skia/issues/detail?id
=1291. | 718 // FIXME: Workaround for https://code.google.com/p/skia/issues/detail?id
=1291. |
| 719 context->clearRect(maskRect); | 719 context->clearRect(maskRect); |
| (...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2806 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2806 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
| 2807 for (RenderObject* child = startChild; child && child != endChild; ) { | 2807 for (RenderObject* child = startChild; child && child != endChild; ) { |
| 2808 // Save our next sibling as moveChildTo will clear it. | 2808 // Save our next sibling as moveChildTo will clear it. |
| 2809 RenderObject* nextSibling = child->nextSibling(); | 2809 RenderObject* nextSibling = child->nextSibling(); |
| 2810 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2810 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
| 2811 child = nextSibling; | 2811 child = nextSibling; |
| 2812 } | 2812 } |
| 2813 } | 2813 } |
| 2814 | 2814 |
| 2815 } // namespace WebCore | 2815 } // namespace WebCore |
| OLD | NEW |