WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Fixed unit tests build
bug-67499-20120411103953.patch (text/plain), 40.40 KB, created by
Shawn Singh
on 2012-04-11 10:39:54 PDT
(
hide
)
Description:
Fixed unit tests build
Filename:
MIME Type:
Creator:
Shawn Singh
Created:
2012-04-11 10:39:54 PDT
Size:
40.40 KB
patch
obsolete
>Subversion Revision: 113809 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a08d40f0962b546bc3dbc6f0713eecad2eda20f8..c4ff3fee0d46f4570e1658708185e80af7a3d700 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,67 @@ >+2012-04-11 Shawn Singh <shawnsingh@chromium.org> >+ >+ [chromium] Support CCHeadsUpDisplay in threaded compositing mode >+ https://bugs.webkit.org/show_bug.cgi?id=67499 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests because this code is debugging code itself. >+ >+ The last item that was needed to make the CCHeadsUpDisplay work in >+ threaded compositing mode was to remove the font rendering code >+ used on the impl-side thread. To solve this, this patch adds a >+ CCFontAtlas that is initialized on the main thread (where the font >+ rendering takes place). Then, when the HUD draws text on the impl >+ thread, it uses the font atlas directly. >+ >+ * WebCore.gypi: >+ * platform/graphics/chromium/LayerRendererChromium.cpp: >+ (WebCore::LayerRendererChromium::create): >+ (WebCore::LayerRendererChromium::initialize): >+ * platform/graphics/chromium/LayerRendererChromium.h: >+ (WebCore): >+ (LayerRendererChromium): >+ * platform/graphics/chromium/cc/CCFontAtlas.cpp: Added. >+ (WebCore): >+ (WebCore::CCFontAtlas::CCFontAtlas): >+ (WebCore::wrapPositionIfNeeded): >+ (WebCore::CCFontAtlas::generateAtlasForFont): >+ (WebCore::CCFontAtlas::initialize): >+ (WebCore::CCFontAtlas::drawText): >+ (WebCore::CCFontAtlas::drawOneLineOfTextInternal): >+ (WebCore::CCFontAtlas::drawDebugAtlas): >+ * platform/graphics/chromium/cc/CCFontAtlas.h: Added. >+ (WebCore): >+ (CCFontAtlas): >+ (WebCore::CCFontAtlas::create): >+ * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: >+ (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay): >+ (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): >+ (WebCore::CCHeadsUpDisplay::drawHudContents): >+ (WebCore::CCHeadsUpDisplay::drawFPSCounter): >+ (WebCore::CCHeadsUpDisplay::drawPlatformLayerTree): >+ * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: >+ (WebCore): >+ (WebCore::CCHeadsUpDisplay::create): >+ (CCHeadsUpDisplay): >+ * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: >+ (WebCore::CCLayerTreeHost::initialize): >+ * platform/graphics/chromium/cc/CCLayerTreeHost.h: >+ (WebCore): >+ (WebCore::CCLayerTreeHost::headsUpDisplayFontAtlas): >+ (CCLayerTreeHost): >+ * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: >+ (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): >+ * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: >+ (WebCore): >+ (CCLayerTreeHostImpl): >+ * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: >+ (WebCore::CCSingleThreadProxy::initializeLayerRenderer): >+ (WebCore::CCSingleThreadProxy::recreateContext): >+ * platform/graphics/chromium/cc/CCThreadProxy.cpp: >+ (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread): >+ (WebCore::CCThreadProxy::recreateContextOnImplThread): >+ > 2012-04-10 James Robinson <jamesr@chromium.org> > > [chromium] Fold LayerChromium::updateCompositorResources into main update >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index 1e811d3c86d57cf13e7cabc0f91c675320a8e539..b0d0990d3ed29ff4ea57c89bbf56eb6d5ae575ea 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,15 @@ >+2012-04-11 Shawn Singh <shawnsingh@chromium.org> >+ >+ [chromium] Support CCHeadsUpDisplay in threaded compositing mode >+ https://bugs.webkit.org/show_bug.cgi?id=67499 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * tests/CCLayerTreeHostImplTest.cpp: >+ (WebKitTests::TEST_F): >+ * tests/LayerRendererChromiumTest.cpp: >+ (LayerRendererChromiumTest::SetUp): >+ > 2012-04-10 James Robinson <jamesr@chromium.org> > > [chromium] Fold LayerChromium::updateCompositorResources into main update >diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi >index f0a91e1411f47a5001b8df3d1c78830c29303fa0..9be9de7169e918eb142f81428027f566d1df86a7 100644 >--- a/Source/WebCore/WebCore.gypi >+++ b/Source/WebCore/WebCore.gypi >@@ -3585,6 +3585,8 @@ > 'platform/graphics/chromium/cc/CCDelayBasedTimeSource.h', > 'platform/graphics/chromium/cc/CCDrawQuad.cpp', > 'platform/graphics/chromium/cc/CCDrawQuad.h', >+ 'platform/graphics/chromium/cc/CCFontAtlas.cpp', >+ 'platform/graphics/chromium/cc/CCFontAtlas.h', > 'platform/graphics/chromium/cc/CCFrameRateController.cpp', > 'platform/graphics/chromium/cc/CCFrameRateController.h', > 'platform/graphics/chromium/cc/CCGestureCurve.h', >diff --git a/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp b/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp >index 0ad73b4672fec2975cc01ef83c85096964eb39db..099bc8acb483e024c00cd3e4526f10794d1c1d1b 100644 >--- a/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp >+++ b/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp >@@ -193,10 +193,10 @@ private: > }; > > >-PassOwnPtr<LayerRendererChromium> LayerRendererChromium::create(LayerRendererChromiumClient* client, PassRefPtr<GraphicsContext3D> context) >+PassOwnPtr<LayerRendererChromium> LayerRendererChromium::create(LayerRendererChromiumClient* client, PassRefPtr<GraphicsContext3D> context, CCFontAtlas* headsUpDisplayFontAtlas) > { > OwnPtr<LayerRendererChromium> layerRenderer(adoptPtr(new LayerRendererChromium(client, context))); >- if (!layerRenderer->initialize()) >+ if (!layerRenderer->initialize(headsUpDisplayFontAtlas)) > return nullptr; > > return layerRenderer.release(); >@@ -234,7 +234,7 @@ private: > LayerRendererChromiumClient* m_client; > }; > >-bool LayerRendererChromium::initialize() >+bool LayerRendererChromium::initialize(CCFontAtlas* headsUpDisplayFontAtlas) > { > if (!m_context->makeContextCurrent()) > return false; >@@ -304,7 +304,7 @@ bool LayerRendererChromium::initialize() > if (!initializeSharedObjects()) > return false; > >- m_headsUpDisplay = CCHeadsUpDisplay::create(this); >+ m_headsUpDisplay = CCHeadsUpDisplay::create(this, headsUpDisplayFontAtlas); > > // Make sure the viewport and context gets initialized, even if it is to zero. > viewportChanged(); >diff --git a/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h b/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h >index d6ac68229069127e3b120e93449cba95e1975691..327386524985ddce41baa9b62519da43b41d9a7a 100644 >--- a/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h >+++ b/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h >@@ -54,6 +54,7 @@ > > namespace WebCore { > >+class CCFontAtlas; > class CCHeadsUpDisplay; > class CCLayerImpl; > class CCRenderPass; >@@ -79,7 +80,7 @@ public: > class LayerRendererChromium { > WTF_MAKE_NONCOPYABLE(LayerRendererChromium); > public: >- static PassOwnPtr<LayerRendererChromium> create(LayerRendererChromiumClient*, PassRefPtr<GraphicsContext3D>); >+ static PassOwnPtr<LayerRendererChromium> create(LayerRendererChromiumClient*, PassRefPtr<GraphicsContext3D>, CCFontAtlas*); > > ~LayerRendererChromium(); > >@@ -168,7 +169,7 @@ protected: > bool isFramebufferDiscarded() const { return m_isFramebufferDiscarded; } > > LayerRendererChromium(LayerRendererChromiumClient*, PassRefPtr<GraphicsContext3D>); >- bool initialize(); >+ bool initialize(CCFontAtlas*); > > private: > void drawQuad(const CCDrawQuad*, const FloatRect& surfaceDamageRect); >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCFontAtlas.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCFontAtlas.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..6626649b1b29ea36852f91de732dfd163c452ef5 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCFontAtlas.cpp >@@ -0,0 +1,177 @@ >+/* >+ * Copyright (C) 2012 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY >+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON >+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS >+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+ >+#if USE(ACCELERATED_COMPOSITING) >+#include "CCFontAtlas.h" >+ >+#include "CCProxy.h" >+#include "Font.h" >+#include "FontCache.h" >+#include "FontDescription.h" >+#include "GraphicsContext.h" >+#include "ImageBuffer.h" >+#include "TextRun.h" >+ >+#define ATLAS_SIZE 128 >+#define FONT_HEIGHT 14 >+ >+namespace WebCore { >+ >+using namespace std; >+ >+ >+CCFontAtlas::CCFontAtlas() >+ : m_fontHeight(FONT_HEIGHT) >+{ >+} >+ >+static void wrapPositionIfNeeded(IntPoint& position, int textWidth, int textHeight) >+{ >+ if (position.x() + textWidth > ATLAS_SIZE) >+ position = IntPoint(0, position.y() + textHeight); >+} >+ >+void CCFontAtlas::generateAtlasForFont(GraphicsContext* atlasContext, const FontDescription& fontDescription, const Color& fontColor, const IntPoint& startingPosition, IntRect asciiToAtlasTable[128]) >+{ >+ ASSERT(CCProxy::isMainThread()); >+ ASSERT(m_atlas); >+ >+ FontCachePurgePreventer fontCachePurgePreventer; >+ >+ IntPoint position = startingPosition; >+ int textHeight = fontDescription.computedPixelSize(); >+ // This is a dirty little trick to account for overhang letters like g, p, j. >+ int inflation = textHeight / 3; >+ >+ Font font(fontDescription, 0, 0); >+ font.update(0); >+ >+ atlasContext->setStrokeColor(fontColor, ColorSpaceDeviceRGB); >+ atlasContext->setFillColor(fontColor, ColorSpaceDeviceRGB); >+ >+ // First, draw a generic rect that will be used for special and unknown characters that have nothing else to render. >+ { >+ int textWidth = textHeight / 2; >+ wrapPositionIfNeeded(position, textWidth, textHeight + inflation); >+ atlasContext->strokeRect(FloatRect(FloatPoint(position.x() + 1, position.y() - textHeight + 1 + inflation), FloatSize(textWidth - 2, textHeight - 2 - inflation)), 1); >+ >+ // Initialize the rect that would be copied when drawing this glyph from the atlas. >+ asciiToAtlasTable[0] = IntRect(IntPoint(position.x(), position.y() - textHeight), IntSize(textWidth, textHeight + inflation)); >+ >+ // Increment to the position where the next glyph will be placed. >+ position.setX(position.x() + textWidth); >+ } >+ >+ // Then, draw the ASCII characters. >+ for (int i = 1; i < 128; ++i) { >+ >+ if (i < 32) { >+ // Special characters will simply use the the default glyph. >+ asciiToAtlasTable[i] = asciiToAtlasTable[0]; >+ continue; >+ } >+ >+ UChar c = static_cast<UChar>(i); >+ String str; >+ str.append(c); >+ TextRun text(str); >+ >+ int textWidth = round(font.width(text)); >+ wrapPositionIfNeeded(position, textWidth, textHeight + inflation); >+ atlasContext->drawText(font, text, position); >+ >+ // Initialize the rect that would be copied when drawing this glyph from the atlas. >+ asciiToAtlasTable[i] = IntRect(IntPoint(position.x(), position.y() - textHeight), IntSize(textWidth, textHeight + inflation)); >+ >+ // Increment to the position where the next glyph will be placed. >+ position.setX(position.x() + textWidth); >+ } >+} >+ >+void CCFontAtlas::initialize() >+{ >+ ASSERT(CCProxy::isMainThread()); >+ >+ // We expect this function to be called only once when the atlas did not exist yet. We should be aware if that's not true. >+ ASSERT(!m_atlas); >+ >+ m_atlas = ImageBuffer::create(IntSize(ATLAS_SIZE, ATLAS_SIZE)); >+ GraphicsContext* atlasContext = m_atlas->context(); >+ >+ // Clear the entire texture atlas to transparent before drawing fonts. >+ atlasContext->setFillColor(Color(0, 0, 0, 0), ColorSpaceDeviceRGB); >+ atlasContext->fillRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE)); >+ >+ // FIXME: monospace font does not work as expected. >+ FontDescription fontDescription; >+ fontDescription.setGenericFamily(FontDescription::MonospaceFamily); >+ fontDescription.setComputedSize(m_fontHeight); >+ generateAtlasForFont(atlasContext, fontDescription, Color(255, 0, 0), IntPoint(0, fontDescription.computedPixelSize()), m_asciiToRectTable); >+} >+ >+void CCFontAtlas::drawText(GraphicsContext* targetContext, const String& text, const IntPoint& destPosition, const IntSize& targetSize) const >+{ >+ ASSERT(CCProxy::isImplThread()); >+ ASSERT(m_atlas); >+ >+ Vector<String> lines; >+ text.split('\n', lines); >+ >+ IntPoint position = destPosition; >+ for (size_t i = 0; i < lines.size(); ++i) { >+ drawOneLineOfTextInternal(targetContext, lines[i], position); >+ position.setY(position.y() + m_fontHeight); >+ if (position.y() > targetSize.height()) >+ return; >+ } >+} >+ >+void CCFontAtlas::drawOneLineOfTextInternal(GraphicsContext* targetContext, const String& textLine, const IntPoint& destPosition) const >+{ >+ ASSERT(CCProxy::isImplThread()); >+ ASSERT(m_atlas); >+ >+ IntPoint position = destPosition; >+ for (unsigned i = 0; i < textLine.length(); ++i) { >+ // If the ASCII code is out of bounds, then index 0 is used, which is just a plain rectangle glyph. >+ int asciiIndex = (textLine[i] < 128) ? textLine[i] : 0; >+ IntRect glyphBounds = m_asciiToRectTable[asciiIndex]; >+ targetContext->drawImageBuffer(m_atlas.get(), ColorSpaceDeviceRGB, position, glyphBounds); >+ position.setX(position.x() + glyphBounds.width()); >+ } >+} >+ >+void CCFontAtlas::drawDebugAtlas(GraphicsContext* targetContext, const IntPoint& destPosition) const >+{ >+ ASSERT(CCProxy::isImplThread()); >+ ASSERT(m_atlas); >+ >+ targetContext->drawImageBuffer(m_atlas.get(), ColorSpaceDeviceRGB, destPosition, IntRect(IntPoint::zero(), IntSize(ATLAS_SIZE, ATLAS_SIZE))); >+} >+ >+} // namespace WebCore >+ >+#endif // USE(ACCELERATED_COMPOSITING) >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCFontAtlas.h b/Source/WebCore/platform/graphics/chromium/cc/CCFontAtlas.h >new file mode 100644 >index 0000000000000000000000000000000000000000..f8cf0288e421a321aa062c6a82cb05d1b3c6f191 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCFontAtlas.h >@@ -0,0 +1,88 @@ >+/* >+ * Copyright (C) 2012 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY >+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON >+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS >+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef CCFontAtlas_h >+#define CCFontAtlas_h >+ >+#if USE(ACCELERATED_COMPOSITING) >+ >+#include "ImageBuffer.h" >+#include <wtf/OwnPtr.h> >+#include <wtf/PassOwnPtr.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+class Color; >+class FontDescription; >+class IntPoint; >+class IntRect; >+class GraphicsContext; >+ >+// This class provides basic ability to draw text onto the heads-up display. >+// It must be initialized on the main thread, and it can only draw text on the impl thread. >+class CCFontAtlas { >+ WTF_MAKE_NONCOPYABLE(CCFontAtlas); >+public: >+ static PassOwnPtr<CCFontAtlas> create() >+ { >+ return adoptPtr(new CCFontAtlas()); >+ } >+ >+ // Creates the font atlas. >+ // Should only be called on the main thread. >+ void initialize(); >+ >+ // Draws multiple lines of text where each line of text is separated by '\n'. >+ // Should only be called only on the impl thread. >+ void drawText(GraphicsContext*, const String& text, const IntPoint& destPosition, const IntSize& targetSize) const; >+ >+ // Draws the entire atlas at the specified position, just for debugging purposes. >+ void drawDebugAtlas(GraphicsContext*, const IntPoint& destPosition) const; >+ >+private: >+ CCFontAtlas(); >+ >+ // Paints the font into the atlas, from left-to-right, top-to-bottom, starting at >+ // startingPosition. At the same time, it updates the ascii-to-IntRect mapping for >+ // each character. By doing things this way, it is possible to support variable-width >+ // fonts and multiple fonts on the same atlas. >+ void generateAtlasForFont(GraphicsContext*, const FontDescription&, const Color& fontColor, const IntPoint& startingPosition, IntRect asciiToAtlasTable[128]); >+ >+ void drawOneLineOfTextInternal(GraphicsContext*, const String&, const IntPoint& destPosition) const; >+ >+ // The actual texture atlas containing all the pre-rendered glyphs. >+ OwnPtr<ImageBuffer> m_atlas; >+ >+ // The look-up tables mapping ascii characters to their IntRect locations on the atlas. >+ IntRect m_asciiToRectTable[128]; >+ >+ int m_fontHeight; >+}; >+ >+} // namespace WebCore >+ >+#endif // USE(ACCELERATED_COMPOSITING) >+ >+#endif >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp >index e4b15d721f73abb95beaa98cd403751971a05a18..d2679f940b2d26fd822bf5d9bdab2e542e147cf6 100644 >--- a/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp >@@ -27,10 +27,8 @@ > #if USE(ACCELERATED_COMPOSITING) > #include "CCHeadsUpDisplay.h" > >+#include "CCFontAtlas.h" > #include "Extensions3DChromium.h" >-#include "Font.h" >-#include "FontCache.h" >-#include "FontDescription.h" > #include "GraphicsContext3D.h" > #include "InspectorController.h" > #include "LayerChromium.h" >@@ -48,45 +46,23 @@ namespace WebCore { > > using namespace std; > >-CCHeadsUpDisplay::CCHeadsUpDisplay(LayerRendererChromium* owner) >+CCHeadsUpDisplay::CCHeadsUpDisplay(LayerRendererChromium* owner, CCFontAtlas* headsUpDisplayFontAtlas) > : m_currentFrameNumber(1) > , m_filteredFrameTime(0) > , m_layerRenderer(owner) > , m_useMapSubForUploads(owner->contextSupportsMapSub()) >+ , m_fontAtlas(headsUpDisplayFontAtlas) > { > m_beginTimeHistoryInSec[0] = currentTime(); > m_beginTimeHistoryInSec[1] = m_beginTimeHistoryInSec[0]; > for (int i = 2; i < kBeginFrameHistorySize; i++) > m_beginTimeHistoryInSec[i] = 0; >- >- // We can't draw text in threaded mode with the current mechanism. >- // FIXME: Figure out a way to draw text in threaded mode. >- if (!CCProxy::implThread()) >- initializeFonts(); > } > > CCHeadsUpDisplay::~CCHeadsUpDisplay() > { > } > >-void CCHeadsUpDisplay::initializeFonts() >-{ >- ASSERT(!CCProxy::implThread()); >- FontDescription mediumFontDesc; >- mediumFontDesc.setGenericFamily(FontDescription::MonospaceFamily); >- mediumFontDesc.setComputedSize(20); >- >- m_mediumFont = adoptPtr(new Font(mediumFontDesc, 0, 0)); >- m_mediumFont->update(0); >- >- FontDescription smallFontDesc; >- smallFontDesc.setGenericFamily(FontDescription::MonospaceFamily); >- smallFontDesc.setComputedSize(10); >- >- m_smallFont = adoptPtr(new Font(smallFontDesc, 0, 0)); >- m_smallFont->update(0); >-} >- > void CCHeadsUpDisplay::onFrameBegin(double timestamp) > { > m_beginTimeHistoryInSec[m_currentFrameNumber % kBeginFrameHistorySize] = timestamp; >@@ -104,7 +80,7 @@ bool CCHeadsUpDisplay::enabled() const > > bool CCHeadsUpDisplay::showPlatformLayerTree() const > { >- return settings().showPlatformLayerTree && !CCProxy::implThread(); >+ return settings().showPlatformLayerTree; > } > > void CCHeadsUpDisplay::draw() >@@ -193,7 +169,7 @@ void CCHeadsUpDisplay::drawHudContents(GraphicsContext* context, const IntSize& > drawFPSCounter(context, fpsCounterTop, fpsCounterHeight); > > if (showPlatformLayerTree()) >- drawPlatformLayerTree(context, platformLayerTreeTop); >+ drawPlatformLayerTree(context, hudSize, platformLayerTreeTop); > } > > void CCHeadsUpDisplay::drawFPSCounter(GraphicsContext* context, int top, int height) >@@ -211,15 +187,16 @@ void CCHeadsUpDisplay::drawFPSCounter(GraphicsContext* context, int top, int hei > } else > m_filteredFrameTime = ((1.0 - alpha) * m_filteredFrameTime) + (alpha * secForLastFrame); > >- float textWidth = 0; >- if (!CCProxy::implThread()) >- textWidth = drawFPSCounterText(context, top, height); >- >+ float textWidth = 80; > float graphWidth = kBeginFrameHistorySize; > >- // Draw background for graph >+ // Draw background for text and graph > context->setFillColor(Color(0, 0, 0, 255), ColorSpaceDeviceRGB); >- context->fillRect(FloatRect(2 + textWidth, top, graphWidth, height)); >+ context->fillRect(FloatRect(2, top, textWidth + graphWidth, height)); >+ >+ // Draw FPS text. >+ if (m_fontAtlas) >+ m_fontAtlas->drawText(context, String::format("FPS: %5.1f", 1.0 / m_filteredFrameTime), IntPoint(10, top + 4), IntSize(textWidth, height)); > > // Draw FPS graph. > const double loFPS = 0.0; >@@ -246,45 +223,10 @@ void CCHeadsUpDisplay::drawFPSCounter(GraphicsContext* context, int top, int hei > } > } > >-float CCHeadsUpDisplay::drawFPSCounterText(GraphicsContext* context, int top, int height) >-{ >- ASSERT(!CCProxy::implThread()); >- >- FontCachePurgePreventer fontCachePurgePreventer; >- >- // Create & measure FPS text. >- String text(String::format("FPS: %5.1f", 1.0 / m_filteredFrameTime)); >- TextRun run(text); >- float textWidth = m_mediumFont->width(run) + 2.0f; >- >- // Draw background. >- context->setFillColor(Color(0, 0, 0, 255), ColorSpaceDeviceRGB); >- context->fillRect(FloatRect(2, top, textWidth, height)); >- >- // Draw FPS text. >- if (m_filteredFrameTime) { >- context->setFillColor(Color(255, 0, 0), ColorSpaceDeviceRGB); >- context->drawText(*m_mediumFont, run, IntPoint(3, top + height - 6)); >- } >- >- return textWidth; >-} >- >-void CCHeadsUpDisplay::drawPlatformLayerTree(GraphicsContext* context, int top) >+void CCHeadsUpDisplay::drawPlatformLayerTree(GraphicsContext* context, const IntSize& hudSize, int top) > { >- ASSERT(!CCProxy::implThread()); >- >- FontCachePurgePreventer fontCachePurgePreventer; >- >- float smallFontHeight = m_smallFont->fontMetrics().floatHeight(); >- int y = top + smallFontHeight - 4; >- context->setFillColor(Color(255, 0, 0), ColorSpaceDeviceRGB); >- Vector<String> lines; >- m_layerRenderer->layerTreeAsText().split('\n', lines); >- for (size_t i = 0; i < lines.size(); ++i) { >- context->drawText(*m_smallFont, TextRun(lines[i]), IntPoint(2, y)); >- y += smallFontHeight; >- } >+ if (m_fontAtlas) >+ m_fontAtlas->drawText(context, m_layerRenderer->layerTreeAsText(), IntPoint(2, top), hudSize); > } > > const CCSettings& CCHeadsUpDisplay::settings() const >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h b/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h >index 5adc9e906b8ff58ea837f3b23267c0608531c800..b8791ae93d3cc2f1cd1a5a20b060d08138ebcacb 100644 >--- a/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h >@@ -27,13 +27,13 @@ > > #if USE(ACCELERATED_COMPOSITING) > >-#include "Font.h" > #include "ProgramBinding.h" > #include "ShaderChromium.h" > > namespace WebCore { > > struct CCSettings; >+class CCFontAtlas; > class GeometryBinding; > class GraphicsContext3D; > class LayerRendererChromium; >@@ -43,9 +43,9 @@ class ManagedTexture; > class CCHeadsUpDisplay { > WTF_MAKE_NONCOPYABLE(CCHeadsUpDisplay); > public: >- static PassOwnPtr<CCHeadsUpDisplay> create(LayerRendererChromium* owner) >+ static PassOwnPtr<CCHeadsUpDisplay> create(LayerRendererChromium* owner, CCFontAtlas* headsUpDisplayFontAtlas) > { >- return adoptPtr(new CCHeadsUpDisplay(owner)); >+ return adoptPtr(new CCHeadsUpDisplay(owner, headsUpDisplayFontAtlas)); > } > > ~CCHeadsUpDisplay(); >@@ -61,17 +61,14 @@ public: > typedef ProgramBinding<VertexShaderPosTex, FragmentShaderRGBATexSwizzleAlpha> Program; > > private: >- explicit CCHeadsUpDisplay(LayerRendererChromium* owner); >+ explicit CCHeadsUpDisplay(LayerRendererChromium* owner, CCFontAtlas* headsUpDisplayFontAtlas); > void drawHudContents(GraphicsContext*, const IntSize& hudSize); > void drawFPSCounter(GraphicsContext*, int top, int height); >- float drawFPSCounterText(GraphicsContext*, int top, int height); >- void drawPlatformLayerTree(GraphicsContext*, int top); >+ void drawPlatformLayerTree(GraphicsContext*, const IntSize& hudSize, int top); > const CCSettings& settings() const; > > bool showPlatformLayerTree() const; > >- void initializeFonts(); >- > int m_currentFrameNumber; > > double m_filteredFrameTime; >@@ -83,10 +80,9 @@ private: > static const int kBeginFrameHistorySize = 64; > double m_beginTimeHistoryInSec[kBeginFrameHistorySize]; > >- OwnPtr<Font> m_smallFont; >- OwnPtr<Font> m_mediumFont; >- > bool m_useMapSubForUploads; >+ >+ CCFontAtlas* m_fontAtlas; > }; > > } >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp >index 8d47a799a9d42df9d56fcc48b63e1be5eba24e5c..d6e1fe2df804f674400dcca6f32f378cc51574ba 100644 >--- a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp >@@ -32,6 +32,7 @@ > #include "Region.h" > #include "TraceEvent.h" > #include "TreeSynchronizer.h" >+#include "cc/CCFontAtlas.h" > #include "cc/CCLayerAnimationController.h" > #include "cc/CCLayerIterator.h" > #include "cc/CCLayerTreeHostCommon.h" >@@ -99,6 +100,12 @@ bool CCLayerTreeHost::initialize() > if (!m_proxy->initializeContext()) > return false; > >+ // Only allocate the font atlas if we have reason to use the heads-up display. >+ if (m_settings.showFPSCounter || m_settings.showPlatformLayerTree) { >+ m_headsUpDisplayFontAtlas = CCFontAtlas::create(); >+ m_headsUpDisplayFontAtlas->initialize(); >+ } >+ > m_compositorIdentifier = m_proxy->compositorIdentifier(); > return true; > } >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h >index 79e1c195111635363b2e9f46f0b12c89ca2c0cad..19d97b97c15f3014fc2de361ae54b98032a0cce1 100644 >--- a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h >@@ -43,6 +43,7 @@ > > namespace WebCore { > >+class CCFontAtlas; > class CCLayerTreeHostImpl; > class CCTextureUpdater; > class GraphicsContext3D; >@@ -219,6 +220,8 @@ public: > bool requestPartialTextureUpdate(); > void deleteTextureAfterCommit(PassOwnPtr<ManagedTexture>); > >+ CCFontAtlas* headsUpDisplayFontAtlas() { return m_headsUpDisplayFontAtlas.get(); } >+ > protected: > CCLayerTreeHost(CCLayerTreeHostClient*, const CCSettings&); > bool initialize(); >@@ -262,6 +265,9 @@ private: > > CCSettings m_settings; > >+ // This is owned by the main layer tree host because it needs to be initialized on the main thread. >+ OwnPtr<CCFontAtlas> m_headsUpDisplayFontAtlas; >+ > IntSize m_viewportSize; > bool m_visible; > typedef HashMap<GraphicsContext3D*, RefPtr<RateLimiter> > RateLimiterMap; >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp >index 201bb514de830373793e541962fdf308503354d4..4622f9e1f7f33a2dcc0aa5b8ae905298cd409e54 100644 >--- a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp >@@ -497,10 +497,10 @@ void CCLayerTreeHostImpl::setVisible(bool visible) > m_timeSourceClientAdapter->setActive(shouldTickInBackground); > } > >-bool CCLayerTreeHostImpl::initializeLayerRenderer(PassRefPtr<GraphicsContext3D> context) >+bool CCLayerTreeHostImpl::initializeLayerRenderer(PassRefPtr<GraphicsContext3D> context, CCFontAtlas* headsUpDisplayFontAtlas) > { > OwnPtr<LayerRendererChromium> layerRenderer; >- layerRenderer = LayerRendererChromium::create(this, context); >+ layerRenderer = LayerRendererChromium::create(this, context, headsUpDisplayFontAtlas); > > // Since we now have a new context/layerRenderer, we cannot continue to use the old > // resources (i.e. renderSurfaces and texture IDs). >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h >index dc6a14833c0d5599ed985ab83c2f2b084f4ee7df..4b49ef7417aaa9afd53f4736e90589033250355f 100644 >--- a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h >@@ -40,6 +40,7 @@ namespace WebCore { > > class CCActiveGestureAnimation; > class CCCompletionEvent; >+class CCFontAtlas; > class CCPageScaleAnimation; > class CCLayerImpl; > class CCLayerTreeHostImplTimeSourceAdapter; >@@ -109,7 +110,7 @@ public: > void finishAllRendering(); > int frameNumber() const { return m_frameNumber; } > >- bool initializeLayerRenderer(PassRefPtr<GraphicsContext3D>); >+ bool initializeLayerRenderer(PassRefPtr<GraphicsContext3D>, CCFontAtlas* headsUpDisplayFontAtlas); > bool isContextLost(); > LayerRendererChromium* layerRenderer() { return m_layerRenderer.get(); } > const LayerRendererCapabilities& layerRendererCapabilities() const; >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp >index 9223c5f6b00d1edd1ea63460c9f0999a4dfdbd09..dfff225507c9ae0a54d8ad79364e54b78159cc51 100644 >--- a/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp >@@ -135,7 +135,7 @@ bool CCSingleThreadProxy::initializeLayerRenderer() > ASSERT(m_contextBeforeInitialization); > { > DebugScopedSetImplThread impl; >- bool ok = m_layerTreeHostImpl->initializeLayerRenderer(m_contextBeforeInitialization.release()); >+ bool ok = m_layerTreeHostImpl->initializeLayerRenderer(m_contextBeforeInitialization.release(), m_layerTreeHost->headsUpDisplayFontAtlas()); > if (ok) { > m_layerRendererInitialized = true; > m_layerRendererCapabilitiesForMainThread = m_layerTreeHostImpl->layerRendererCapabilities(); >@@ -159,7 +159,7 @@ bool CCSingleThreadProxy::recreateContext() > { > DebugScopedSetImplThread impl; > m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->contentsTextureAllocator()); >- initialized = m_layerTreeHostImpl->initializeLayerRenderer(context); >+ initialized = m_layerTreeHostImpl->initializeLayerRenderer(context, m_layerTreeHost->headsUpDisplayFontAtlas()); > if (initialized) { > m_layerRendererCapabilitiesForMainThread = m_layerTreeHostImpl->layerRendererCapabilities(); > } >diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp >index dbdca6a7d0538d0485e19113ed9716751d7a51a3..9cebde6e2504a3f0aaf3447d6946c50e00f02054 100644 >--- a/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp >+++ b/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp >@@ -716,7 +716,7 @@ void CCThreadProxy::initializeLayerRendererOnImplThread(CCCompletionEvent* compl > TRACE_EVENT("CCThreadProxy::initializeLayerRendererOnImplThread", this, 0); > ASSERT(isImplThread()); > ASSERT(m_contextBeforeInitializationOnImplThread); >- *initializeSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(m_contextBeforeInitializationOnImplThread.release()); >+ *initializeSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(m_contextBeforeInitializationOnImplThread.release(), m_layerTreeHost->headsUpDisplayFontAtlas()); > if (*initializeSucceeded) { > *capabilities = m_layerTreeHostImpl->layerRendererCapabilities(); > if (capabilities->usingSwapCompleteCallback) >@@ -753,7 +753,7 @@ void CCThreadProxy::recreateContextOnImplThread(CCCompletionEvent* completion, G > TRACE_EVENT0("cc", "CCThreadProxy::recreateContextOnImplThread"); > ASSERT(isImplThread()); > m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->contentsTextureAllocator()); >- *recreateSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(adoptRef(contextPtr)); >+ *recreateSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(adoptRef(contextPtr), m_layerTreeHost->headsUpDisplayFontAtlas()); > if (*recreateSucceeded) { > *capabilities = m_layerTreeHostImpl->layerRendererCapabilities(); > m_schedulerOnImplThread->didRecreateContext(); >diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp >index c9f38a01fde1e79522a8785f9c0de9207d992780..352d2897116764ed947bdee6981d5c83cff445c4 100644 >--- a/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp >+++ b/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp >@@ -247,7 +247,7 @@ TEST_F(CCLayerTreeHostImplTest, nonFastScrollableRegionBasic) > > TEST_F(CCLayerTreeHostImplTest, nonFastScrollableRegionWithOffset) > { >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > > OwnPtr<CCLayerImpl> root = CCLayerImpl::create(0); > root->setScrollable(true); >@@ -433,7 +433,7 @@ private: > > TEST_F(CCLayerTreeHostImplTest, didDrawNotCalledOnHiddenLayer) > { >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > > // Ensure visibleLayerRect for root layer is empty > m_hostImpl->setViewportSize(IntSize(0, 0)); >@@ -471,7 +471,7 @@ TEST_F(CCLayerTreeHostImplTest, didDrawNotCalledOnHiddenLayer) > > TEST_F(CCLayerTreeHostImplTest, didDrawCalledOnAllLayers) > { >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > m_hostImpl->setViewportSize(IntSize(10, 10)); > > m_hostImpl->setRootLayer(DidDrawCheckLayer::create(0)); >@@ -523,7 +523,7 @@ private: > > TEST_F(CCLayerTreeHostImplTest, prepareToDrawFailsWhenAnimationUsesCheckerboard) > { >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > m_hostImpl->setViewportSize(IntSize(10, 10)); > > // When the texture is not missing, we draw as usual. >@@ -644,7 +644,7 @@ private: > // https://bugs.webkit.org/show_bug.cgi?id=75783 > TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers) > { >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > m_hostImpl->setViewportSize(IntSize(10, 10)); > > { >@@ -846,7 +846,7 @@ TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers) > > TEST_F(CCLayerTreeHostImplTest, viewportCovered) > { >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > m_hostImpl->setBackgroundColor(Color::gray); > > IntSize viewportSize(100, 100); >@@ -953,7 +953,7 @@ TEST_F(CCLayerTreeHostImplTest, reshapeNotCalledUntilDraw) > { > ReshapeTrackerContext* reshapeTracker = new ReshapeTrackerContext(); > RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(reshapeTracker), GraphicsContext3D::RenderDirectlyToHostWindow); >- m_hostImpl->initializeLayerRenderer(context); >+ m_hostImpl->initializeLayerRenderer(context, 0); > m_hostImpl->setViewportSize(IntSize(10, 10)); > > CCLayerImpl* root = new FakeDrawableCCLayerImpl(1); >@@ -1002,7 +1002,7 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect) > CCSettings settings; > settings.partialSwapEnabled = true; > OwnPtr<CCLayerTreeHostImpl> layerTreeHostImpl = CCLayerTreeHostImpl::create(settings, this); >- layerTreeHostImpl->initializeLayerRenderer(context); >+ layerTreeHostImpl->initializeLayerRenderer(context, 0); > layerTreeHostImpl->setViewportSize(IntSize(500, 500)); > > CCLayerImpl* root = new FakeDrawableCCLayerImpl(1); >@@ -1085,7 +1085,7 @@ private: > > TEST_F(CCLayerTreeHostImplTest, contextLostAndRestoredNotificationSentToAllLayers) > { >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > m_hostImpl->setViewportSize(IntSize(10, 10)); > > m_hostImpl->setRootLayer(ContextLostNotificationCheckLayer::create(0)); >@@ -1101,7 +1101,7 @@ TEST_F(CCLayerTreeHostImplTest, contextLostAndRestoredNotificationSentToAllLayer > EXPECT_FALSE(layer1->didLoseContextCalled()); > EXPECT_FALSE(layer2->didLoseContextCalled()); > >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > > EXPECT_TRUE(root->didLoseContextCalled()); > EXPECT_TRUE(layer1->didLoseContextCalled()); >@@ -1116,7 +1116,7 @@ public: > TEST_F(CCLayerTreeHostImplTest, finishAllRenderingAfterContextLost) > { > // The context initialization will fail, but we should still be able to call finishAllRendering() without any ill effects. >- m_hostImpl->initializeLayerRenderer(GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new FakeWebGraphicsContext3DMakeCurrentFails), GraphicsContext3D::RenderDirectlyToHostWindow)); >+ m_hostImpl->initializeLayerRenderer(GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new FakeWebGraphicsContext3DMakeCurrentFails), GraphicsContext3D::RenderDirectlyToHostWindow), 0); > m_hostImpl->finishAllRendering(); > } > >@@ -1132,7 +1132,7 @@ private: > > TEST_F(CCLayerTreeHostImplTest, scrollbarLayerLostContext) > { >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > m_hostImpl->setViewportSize(IntSize(10, 10)); > > m_hostImpl->setRootLayer(ScrollbarLayerFakePaint::create(0)); >@@ -1149,7 +1149,7 @@ TEST_F(CCLayerTreeHostImplTest, scrollbarLayerLostContext) > // Scrollbar layer should always generate quads, even after lost context > EXPECT_GT(renderPass->quadList().size(), 0u); > >- m_hostImpl->initializeLayerRenderer(createContext()); >+ m_hostImpl->initializeLayerRenderer(createContext(), 0); > } > } > >diff --git a/Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp b/Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp >index a3b449db8cb5a55a6e7857ada7417d5aeae4d874..fb3fd86c603f52003e4c4e3a34fbf9e5d126d309 100644 >--- a/Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp >+++ b/Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp >@@ -112,7 +112,7 @@ protected: > > virtual void SetUp() > { >- m_layerRendererChromium.initialize(); >+ m_layerRendererChromium.initialize(0); > } > > void swapBuffers()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 67499
:
136613
|
136694
|
136957
|
136998
|
137036
|
137096