Changeset 194814 in webkit


Ignore:
Timestamp:
Jan 8, 2016, 5:41:27 PM (10 years ago)
Author:
Simon Fraser
Message:

Add DisplayList hooks into GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=152932

Reviewed by Zalan Bujtas.

Add the hooks into GraphicsContext that call into the DisplayListRecorder if there
is one.

Rename size() to something less ambiguous.

Out-of-line some DisplayList functions so that the header doesn't need to see
DisplayListItems.h.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::save):
(WebCore::GraphicsContext::restore):
(WebCore::GraphicsContext::setStrokeThickness):
(WebCore::GraphicsContext::setStrokeStyle):
(WebCore::GraphicsContext::setStrokeColor):
(WebCore::GraphicsContext::setShadow):
(WebCore::GraphicsContext::setLegacyShadow):
(WebCore::GraphicsContext::clearShadow):
(WebCore::GraphicsContext::setFillColor):
(WebCore::GraphicsContext::setShadowsIgnoreTransforms):
(WebCore::GraphicsContext::setShouldAntialias):
(WebCore::GraphicsContext::setShouldSmoothFonts):
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::setAntialiasedFontDilationEnabled):
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setFillRule):
(WebCore::GraphicsContext::setFillGradient):
(WebCore::GraphicsContext::beginTransparencyLayer):
(WebCore::GraphicsContext::endTransparencyLayer):
(WebCore::GraphicsContext::drawGlyphs):
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):
(WebCore::GraphicsContext::setTextDrawingMode):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::setCompositeOperation):
(WebCore::GraphicsContext::setDrawLuminanceMask):
(WebCore::GraphicsContext::applyDeviceScaleFactor):
(WebCore::GraphicsContext::applyState):

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::setDisplayListRecorder):
(WebCore::GraphicsContext::isRecording):
(WebCore::GraphicsContext::setFillRule): Deleted.
(WebCore::GraphicsContext::setShadowsIgnoreTransforms): Deleted.
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): Deleted.
(WebCore::GraphicsContext::setDrawLuminanceMask): Deleted.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::clear):
(WebCore::DisplayList::DisplayList::removeItemsFromIndex):

  • platform/graphics/displaylists/DisplayList.h:

(WebCore::DisplayList::DisplayList::itemCount):
(WebCore::DisplayList::DisplayList::clear): Deleted.
(WebCore::DisplayList::DisplayList::size): Deleted.
(WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::save):
(WebCore::DisplayList::Recorder::restore):

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::itemCount):
(WebCore::DisplayList::Recorder::size): Deleted.

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::Replayer::replay):

Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r194800 r194814  
     12016-01-08  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add DisplayList hooks into GraphicsContext
     4        https://bugs.webkit.org/show_bug.cgi?id=152932
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Add the hooks into GraphicsContext that call into the DisplayListRecorder if there
     9        is one.
     10       
     11        Rename size() to something less ambiguous.
     12       
     13        Out-of-line some DisplayList functions so that the header doesn't need to see
     14        DisplayListItems.h.
     15
     16        * platform/graphics/GraphicsContext.cpp:
     17        (WebCore::GraphicsContext::save):
     18        (WebCore::GraphicsContext::restore):
     19        (WebCore::GraphicsContext::setStrokeThickness):
     20        (WebCore::GraphicsContext::setStrokeStyle):
     21        (WebCore::GraphicsContext::setStrokeColor):
     22        (WebCore::GraphicsContext::setShadow):
     23        (WebCore::GraphicsContext::setLegacyShadow):
     24        (WebCore::GraphicsContext::clearShadow):
     25        (WebCore::GraphicsContext::setFillColor):
     26        (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
     27        (WebCore::GraphicsContext::setShouldAntialias):
     28        (WebCore::GraphicsContext::setShouldSmoothFonts):
     29        (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
     30        (WebCore::GraphicsContext::setImageInterpolationQuality):
     31        (WebCore::GraphicsContext::setAntialiasedFontDilationEnabled):
     32        (WebCore::GraphicsContext::setStrokePattern):
     33        (WebCore::GraphicsContext::setFillPattern):
     34        (WebCore::GraphicsContext::setStrokeGradient):
     35        (WebCore::GraphicsContext::setFillRule):
     36        (WebCore::GraphicsContext::setFillGradient):
     37        (WebCore::GraphicsContext::beginTransparencyLayer):
     38        (WebCore::GraphicsContext::endTransparencyLayer):
     39        (WebCore::GraphicsContext::drawGlyphs):
     40        (WebCore::GraphicsContext::drawImage):
     41        (WebCore::GraphicsContext::drawTiledImage):
     42        (WebCore::GraphicsContext::setTextDrawingMode):
     43        (WebCore::GraphicsContext::fillRect):
     44        (WebCore::GraphicsContext::fillRoundedRect):
     45        (WebCore::GraphicsContext::setAlpha):
     46        (WebCore::GraphicsContext::setCompositeOperation):
     47        (WebCore::GraphicsContext::setDrawLuminanceMask):
     48        (WebCore::GraphicsContext::applyDeviceScaleFactor):
     49        (WebCore::GraphicsContext::applyState):
     50        * platform/graphics/GraphicsContext.h:
     51        (WebCore::GraphicsContext::setDisplayListRecorder):
     52        (WebCore::GraphicsContext::isRecording):
     53        (WebCore::GraphicsContext::setFillRule): Deleted.
     54        (WebCore::GraphicsContext::setShadowsIgnoreTransforms): Deleted.
     55        (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): Deleted.
     56        (WebCore::GraphicsContext::setDrawLuminanceMask): Deleted.
     57        * platform/graphics/displaylists/DisplayList.cpp:
     58        (WebCore::DisplayList::DisplayList::clear):
     59        (WebCore::DisplayList::DisplayList::removeItemsFromIndex):
     60        * platform/graphics/displaylists/DisplayList.h:
     61        (WebCore::DisplayList::DisplayList::itemCount):
     62        (WebCore::DisplayList::DisplayList::clear): Deleted.
     63        (WebCore::DisplayList::DisplayList::size): Deleted.
     64        (WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.
     65        * platform/graphics/displaylists/DisplayListRecorder.cpp:
     66        (WebCore::DisplayList::Recorder::save):
     67        (WebCore::DisplayList::Recorder::restore):
     68        * platform/graphics/displaylists/DisplayListRecorder.h:
     69        (WebCore::DisplayList::Recorder::itemCount):
     70        (WebCore::DisplayList::Recorder::size): Deleted.
     71        * platform/graphics/displaylists/DisplayListReplayer.cpp:
     72        (WebCore::DisplayList::Replayer::replay):
     73
    1742016-01-08  Brady Eidson  <beidson@apple.com>
    275
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp

    r194798 r194814  
    2929#include "BidiResolver.h"
    3030#include "BitmapImage.h"
     31#include "DisplayListRecorder.h"
    3132#include "FloatRoundedRect.h"
    3233#include "Gradient.h"
     
    384385    m_stack.append(m_state);
    385386
     387    if (isRecording()) {
     388        m_displayListRecorder->save();
     389        return;
     390    }
     391
    386392    savePlatformState();
    387393}
     
    404410        m_stack.clear();
    405411
     412    if (isRecording()) {
     413        m_displayListRecorder->restore();
     414        return;
     415    }
     416
    406417    restorePlatformState();
    407418}
     
    430441{
    431442    m_state.strokeThickness = thickness;
     443    if (isRecording()) {
     444        m_displayListRecorder->updateState(m_state, GraphicsContextState::StrokeThicknessChange);
     445        return;
     446    }
     447
    432448    setPlatformStrokeThickness(thickness);
    433449}
     
    436452{
    437453    m_state.strokeStyle = style;
     454    if (isRecording()) {
     455        m_displayListRecorder->updateState(m_state, GraphicsContextState::StrokeStyleChange);
     456        return;
     457    }
    438458    setPlatformStrokeStyle(style);
    439459}
     
    444464    m_state.strokeGradient = nullptr;
    445465    m_state.strokePattern = nullptr;
     466    if (isRecording()) {
     467        m_displayListRecorder->updateState(m_state, GraphicsContextState::StrokeColorChange);
     468        return;
     469    }
    446470    setPlatformStrokeColor(color);
    447471}
     
    452476    m_state.shadowBlur = blur;
    453477    m_state.shadowColor = color;
     478#if USE(CG)
     479    m_state.shadowsUseLegacyRadius = false;
     480#endif
     481    if (isRecording()) {
     482        m_displayListRecorder->updateState(m_state, GraphicsContextState::ShadowChange);
     483        return;
     484    }
    454485    setPlatformShadow(offset, blur, color);
    455486}
     
    463494    m_state.shadowsUseLegacyRadius = true;
    464495#endif
     496    if (isRecording()) {
     497        m_displayListRecorder->updateState(m_state, GraphicsContextState::ShadowChange);
     498        return;
     499    }
    465500    setPlatformShadow(offset, blur, color);
    466501}
     
    471506    m_state.shadowBlur = 0;
    472507    m_state.shadowColor = Color();
     508#if USE(CG)
     509    m_state.shadowsUseLegacyRadius = false;
     510#endif
     511
     512    if (isRecording()) {
     513        m_displayListRecorder->clearShadow();
     514        return;
     515    }
    473516    clearPlatformShadow();
    474517}
     
    506549    m_state.fillGradient = nullptr;
    507550    m_state.fillPattern = nullptr;
     551
     552    if (isRecording()) {
     553        m_displayListRecorder->updateState(m_state, GraphicsContextState::FillColorChange);
     554        return;
     555    }
     556
    508557    setPlatformFillColor(color);
    509558}
    510559
     560void GraphicsContext::setShadowsIgnoreTransforms(bool shadowsIgnoreTransforms)
     561{
     562    m_state.shadowsIgnoreTransforms = shadowsIgnoreTransforms;
     563    if (isRecording())
     564        m_displayListRecorder->updateState(m_state, GraphicsContextState::ShadowsIgnoreTransformsChange);
     565}
     566
    511567void GraphicsContext::setShouldAntialias(bool shouldAntialias)
    512568{
    513569    m_state.shouldAntialias = shouldAntialias;
     570
     571    if (isRecording()) {
     572        m_displayListRecorder->updateState(m_state, GraphicsContextState::ShouldAntialiasChange);
     573        return;
     574    }
     575
    514576    setPlatformShouldAntialias(shouldAntialias);
    515577}
     
    518580{
    519581    m_state.shouldSmoothFonts = shouldSmoothFonts;
     582   
     583    if (isRecording()) {
     584        m_displayListRecorder->updateState(m_state, GraphicsContextState::ShouldSmoothFontsChange);
     585        return;
     586    }
     587   
    520588    setPlatformShouldSmoothFonts(shouldSmoothFonts);
    521589}
    522590
     591void GraphicsContext::setShouldSubpixelQuantizeFonts(bool shouldSubpixelQuantizeFonts)
     592{
     593    m_state.shouldSubpixelQuantizeFonts = shouldSubpixelQuantizeFonts;
     594    if (isRecording())
     595        m_displayListRecorder->updateState(m_state, GraphicsContextState::ShouldSubpixelQuantizeFontsChange);
     596}
     597
    523598void GraphicsContext::setImageInterpolationQuality(InterpolationQuality imageInterpolationQuality)
    524599{
     
    528603        return;
    529604
     605    if (isRecording()) {
     606        m_displayListRecorder->updateState(m_state, GraphicsContextState::ImageInterpolationQualityChange);
     607        return;
     608    }
     609
    530610    setPlatformImageInterpolationQuality(imageInterpolationQuality);
    531611}
     
    534614{
    535615    m_state.antialiasedFontDilationEnabled = antialiasedFontDilationEnabled;
     616    if (isRecording())
     617        m_displayListRecorder->updateState(m_state, GraphicsContextState::AntialiasedFontDilationEnabledChange);
    536618}
    537619
     
    540622    m_state.strokeGradient = nullptr;
    541623    m_state.strokePattern = WTFMove(pattern);
     624    if (isRecording())
     625        m_displayListRecorder->updateState(m_state, GraphicsContextState::StrokePatternChange);
    542626}
    543627
     
    546630    m_state.fillGradient = nullptr;
    547631    m_state.fillPattern = WTFMove(pattern);
     632    if (isRecording())
     633        m_displayListRecorder->updateState(m_state, GraphicsContextState::FillPatternChange);
    548634}
    549635
     
    552638    m_state.strokeGradient = WTFMove(gradient);
    553639    m_state.strokePattern = nullptr;
     640    if (isRecording())
     641        m_displayListRecorder->updateState(m_state, GraphicsContextState::StrokeGradientChange);
     642}
     643
     644void GraphicsContext::setFillRule(WindRule fillRule)
     645{
     646    m_state.fillRule = fillRule;
     647    if (isRecording())
     648        m_displayListRecorder->updateState(m_state, GraphicsContextState::FillRuleChange);
    554649}
    555650
     
    558653    m_state.fillGradient = WTFMove(gradient);
    559654    m_state.fillPattern = nullptr;
     655    if (isRecording())
     656        m_displayListRecorder->updateState(m_state, GraphicsContextState::FillGradientChange); // FIXME: also fill pattern?
    560657}
    561658
    562659void GraphicsContext::beginTransparencyLayer(float opacity)
    563660{
     661    if (isRecording()) {
     662        m_displayListRecorder->beginTransparencyLayer(opacity);
     663        return;
     664    }
    564665    beginPlatformTransparencyLayer(opacity);
    565666    ++m_transparencyCount;
     
    568669void GraphicsContext::endTransparencyLayer()
    569670{
     671    if (isRecording()) {
     672        m_displayListRecorder->endTransparencyLayer();
     673        return;
     674    }
    570675    endPlatformTransparencyLayer();
    571676    ASSERT(m_transparencyCount > 0);
     
    585690    if (paintingDisabled())
    586691        return;
     692
     693    if (isRecording()) {
     694        m_displayListRecorder->drawGlyphs(font, buffer, from, numGlyphs, point, fontCascade.fontDescription().fontSmoothing());
     695        return;
     696    }
    587697
    588698    fontCascade.drawGlyphs(*this, font, buffer, from, numGlyphs, point);
     
    652762        return;
    653763
     764    if (isRecording()) {
     765        m_displayListRecorder->drawImage(image, destination, source, imagePaintingOptions);
     766        return;
     767    }
     768
    654769    // FIXME (49002): Should be InterpolationLow
    655770    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationNone : imageInterpolationQuality());
     
    662777        return;
    663778
     779    if (isRecording()) {
     780        m_displayListRecorder->drawTiledImage(image, destination, source, tileSize, spacing, imagePaintingOptions);
     781        return;
     782    }
     783
    664784    InterpolationQualityMaintainer interpolationQualityForThisScope(*this, imagePaintingOptions.m_useLowQualityScale ? InterpolationLow : imageInterpolationQuality());
    665785    image.drawTiled(*this, destination, source, tileSize, spacing, imagePaintingOptions.m_compositeOperator, imagePaintingOptions.m_blendMode);
     
    671791    if (paintingDisabled())
    672792        return;
     793
     794    if (isRecording()) {
     795        m_displayListRecorder->drawTiledImage(image, destination, source, tileScaleFactor, hRule, vRule, imagePaintingOptions);
     796        return;
     797    }
    673798
    674799    if (hRule == Image::StretchTile && vRule == Image::StretchTile) {
     
    767892    if (paintingDisabled())
    768893        return;
     894
     895    if (isRecording()) {
     896        m_displayListRecorder->updateState(m_state, GraphicsContextState::TextDrawingModeChange);
     897        return;
     898    }
    769899    setPlatformTextDrawingMode(mode);
    770900}
     
    774904    if (paintingDisabled())
    775905        return;
     906
     907    if (isRecording()) {
     908        m_displayListRecorder->fillRect(rect, gradient);
     909        return;
     910    }
     911
    776912    gradient.fill(this, rect);
    777913}
     
    781917    if (paintingDisabled())
    782918        return;
     919
     920    if (isRecording()) {
     921        m_displayListRecorder->fillRect(rect, color, op, blendMode);
     922        return;
     923    }
    783924
    784925    CompositeOperator previousOperator = compositeOperation();
     
    792933    if (paintingDisabled())
    793934        return;
     935
     936    if (isRecording()) {
     937        m_displayListRecorder->fillRoundedRect(rect, color, blendMode);
     938        return;
     939    }
    794940
    795941    if (rect.isRounded()) {
     
    831977{
    832978    m_state.alpha = alpha;
     979    if (isRecording()) {
     980        m_displayListRecorder->updateState(m_state, GraphicsContextState::AlphaChange);
     981        return;
     982    }
    833983    setPlatformAlpha(alpha);
    834984}
     
    838988    m_state.compositeOperator = compositeOperation;
    839989    m_state.blendMode = blendMode;
     990    if (isRecording()) {
     991        m_displayListRecorder->updateState(m_state, GraphicsContextState::CompositeOperationChange);
     992        return;
     993    }
    840994    setPlatformCompositeOperation(compositeOperation, blendMode);
     995}
     996
     997void GraphicsContext::setDrawLuminanceMask(bool drawLuminanceMask)
     998{
     999    m_state.drawLuminanceMask = drawLuminanceMask;
     1000    if (isRecording())
     1001        m_displayListRecorder->updateState(m_state, GraphicsContextState::DrawLuminanceMaskChange);
    8411002}
    8421003
     
    9351096{
    9361097    scale(FloatSize(deviceScaleFactor, deviceScaleFactor));
     1098
     1099    if (isRecording()) {
     1100        m_displayListRecorder->applyDeviceScaleFactor(deviceScaleFactor);
     1101        return;
     1102    }
     1103
    9371104    platformApplyDeviceScaleFactor(deviceScaleFactor);
    9381105}
     
    10141181}
    10151182
    1016 }
     1183void GraphicsContext::applyState(const GraphicsContextState& state)
     1184{
     1185    setPlatformShadow(state.shadowOffset, state.shadowBlur, state.shadowColor);
     1186    setPlatformStrokeThickness(state.strokeThickness);
     1187    setPlatformTextDrawingMode(state.textDrawingMode);
     1188    setPlatformStrokeColor(state.strokeColor);
     1189    setPlatformFillColor(state.fillColor);
     1190    setPlatformStrokeStyle(state.strokeStyle);
     1191    setPlatformAlpha(state.alpha);
     1192    setPlatformCompositeOperation(state.compositeOperator, state.blendMode);
     1193    setPlatformShouldAntialias(state.shouldAntialias);
     1194    setPlatformShouldSmoothFonts(state.shouldSmoothFonts);
     1195}
     1196
     1197}
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.h

    r194798 r194814  
    110110    InterpolationHigh
    111111};
     112
     113namespace DisplayList {
     114class Recorder;
     115}
    112116
    113117struct GraphicsContextState {
     
    247251public:
    248252    WEBCORE_EXPORT GraphicsContext(PlatformGraphicsContext*);
     253    GraphicsContext() = default;
    249254    WEBCORE_EXPORT ~GraphicsContext();
    250255   
     
    257262    WEBCORE_EXPORT PlatformGraphicsContext* platformContext() const;
    258263
    259     bool paintingDisabled() const { return !m_data; }
     264    bool paintingDisabled() const { return !m_data && !isRecording(); }
    260265    bool updatingControlTints() const { return m_nonPaintingReasons == NonPaintingReasons::UpdatingControlTints; }
     266
     267    void setDisplayListRecorder(DisplayList::Recorder* recorder) { m_displayListRecorder = recorder; }
     268    bool isRecording() const { return m_displayListRecorder; }
    261269
    262270    void setStrokeThickness(float);
     
    275283    Gradient* strokeGradient() const { return m_state.strokeGradient.get(); }
    276284
    277     void setFillRule(WindRule fillRule) { m_state.fillRule = fillRule; }
     285    void setFillRule(WindRule);
    278286    WindRule fillRule() const { return m_state.fillRule; }
    279287
     
    287295    Gradient* fillGradient() const { return m_state.fillGradient.get(); }
    288296
    289     void setShadowsIgnoreTransforms(bool shadowsIgnoreTransforms) { m_state.shadowsIgnoreTransforms = shadowsIgnoreTransforms; }
     297    void setShadowsIgnoreTransforms(bool);
    290298    bool shadowsIgnoreTransforms() const { return m_state.shadowsIgnoreTransforms; }
    291299
     
    301309    // Normally CG enables subpixel-quantization because it improves the performance of aligning glyphs.
    302310    // In some cases we have to disable to to ensure a high-quality output of the glyphs.
    303     void setShouldSubpixelQuantizeFonts(bool shouldSubpixelQuantizeFonts) { m_state.shouldSubpixelQuantizeFonts = shouldSubpixelQuantizeFonts; }
     311    void setShouldSubpixelQuantizeFonts(bool);
    304312    bool shouldSubpixelQuantizeFonts() const { return m_state.shouldSubpixelQuantizeFonts; }
    305313
     
    394402    void drawBidiText(const FontCascade&, const TextRun&, const FloatPoint&, FontCascade::CustomFontNotReadyAction = FontCascade::DoNotPaintIfFontNotReady);
    395403
     404    void applyState(const GraphicsContextState&);
     405
    396406    enum RoundingMode {
    397407        RoundAllSides,
     
    453463    BlendMode blendModeOperation() const { return m_state.blendMode; }
    454464
    455     void setDrawLuminanceMask(bool drawLuminanceMask) { m_state.drawLuminanceMask = drawLuminanceMask; }
     465    void setDrawLuminanceMask(bool);
    456466    bool drawLuminanceMask() const { return m_state.drawLuminanceMask; }
    457467
     
    603613
    604614    GraphicsContextPlatformPrivate* m_data { nullptr };
     615    DisplayList::Recorder* m_displayListRecorder { nullptr };
    605616
    606617    GraphicsContextState m_state;
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp

    r194708 r194814  
    4949#endif
    5050
     51void DisplayList::clear()
     52{
     53    m_list.clear();
     54}
     55
     56void DisplayList::removeItemsFromIndex(size_t index)
     57{
     58    m_list.resize(index);
     59}
     60
    5161void DisplayList::dump(TextStream& ts) const
    5262{
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.h

    r194708 r194814  
    5959    }
    6060   
    61     void clear() { m_list.clear(); }
    62     size_t size() const { return m_list.size(); }
     61    void clear();
     62    void removeItemsFromIndex(size_t);
    6363
    64     void removeItemsFromIndex(size_t index)
    65     {
    66         m_list.resize(index);
    67     }
    68 
     64    size_t itemCount() const { return m_list.size(); }
    6965    size_t sizeInBytes() const;
    7066
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp

    r194708 r194814  
    144144{
    145145    appendItem(Save::create());
    146     m_stateStack.append(m_stateStack.last().cloneForSave(m_displayList.size() - 1));
     146    m_stateStack.append(m_stateStack.last().cloneForSave(m_displayList.itemCount() - 1));
    147147}
    148148
     
    169169    if (saveIndex) {
    170170        Save& saveItem = downcast<Save>(m_displayList.itemAt(saveIndex));
    171         saveItem.setRestoreIndex(m_displayList.size() - 1);
     171        saveItem.setRestoreIndex(m_displayList.itemCount() - 1);
    172172    }
    173173}
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h

    r194708 r194814  
    121121    void applyDeviceScaleFactor(float);
    122122
    123     size_t size() const { return m_displayList.size(); }
     123    size_t itemCount() const { return m_displayList.itemCount(); }
    124124
    125125private:
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp

    r194708 r194814  
    5151    UNUSED_PARAM(initialClip);
    5252
    53     size_t numItems = m_displayList.size();
     53    size_t numItems = m_displayList.itemCount();
    5454    for (size_t i = 0; i < numItems; ++i) {
    5555        auto& item = m_displayList.list()[i].get();
Note: See TracChangeset for help on using the changeset viewer.