Commit c4b51d2e authored by jamesr@google.com's avatar jamesr@google.com

[chromium] Remove unused compositeToTexture / compositeOffscreen setting

https://bugs.webkit.org/show_bug.cgi?id=83733

Reviewed by Adrienne Walker.

Source/Platform:

Remove compositeOffscreen setting. This was an experiment that is no longer needed.

* chromium/public/WebLayerTreeView.h:
(WebKit::WebLayerTreeView::Settings::Settings):
(Settings):

Source/WebCore:

Remove compositeOffscreen setting and implementation. This was an experiment that is no longer needed.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::finishDrawingFrame):
(WebCore::LayerRendererChromium::useRenderSurface):
(WebCore::LayerRendererChromium::setScissorToRect):
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromium):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
(CCSettings):

Source/WebKit/chromium:

Remove compositeOffscreen / compositeToTexture setting. This was an experiment that is no longer needed.

* public/WebSettings.h:
* src/WebLayerTreeView.cpp:
(WebKit::WebLayerTreeView::Settings::operator CCSettings):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::WebSettingsImpl):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):

Tools:

Remove compositeOffscreen / compositeToTexture setting. This was an experiment that is no longer needed.

* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::resetWebSettings):
* DumpRenderTree/chromium/TestShell.h:
(TestShell):
* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):
(WebPreferences::applyTo):
* DumpRenderTree/chromium/WebPreferences.h:
(WebPreferences):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f9a5b94d
2012-04-11 James Robinson <jamesr@chromium.org>
[chromium] Remove unused compositeToTexture / compositeOffscreen setting
https://bugs.webkit.org/show_bug.cgi?id=83733
Reviewed by Adrienne Walker.
Remove compositeOffscreen setting. This was an experiment that is no longer needed.
* chromium/public/WebLayerTreeView.h:
(WebKit::WebLayerTreeView::Settings::Settings):
(Settings):
2012-04-13 James Robinson <jamesr@chromium.org>
[chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API
......
......@@ -50,7 +50,6 @@ public:
struct Settings {
Settings()
: acceleratePainting(false)
, compositeOffscreen(false)
, showFPSCounter(false)
, showPlatformLayerTree(false)
, refreshRate(0)
......@@ -61,7 +60,6 @@ public:
}
bool acceleratePainting;
bool compositeOffscreen;
bool showFPSCounter;
bool showPlatformLayerTree;
double refreshRate;
......
2012-04-11 James Robinson <jamesr@chromium.org>
[chromium] Remove unused compositeToTexture / compositeOffscreen setting
https://bugs.webkit.org/show_bug.cgi?id=83733
Reviewed by Adrienne Walker.
Remove compositeOffscreen setting and implementation. This was an experiment that is no longer needed.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::finishDrawingFrame):
(WebCore::LayerRendererChromium::useRenderSurface):
(WebCore::LayerRendererChromium::setScissorToRect):
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromium):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
(CCSettings):
2012-04-13 Alexey Proskuryakov <ap@apple.com>
REGRESSION (XHR Caching): Uncacheable responses sent by Rails through Apache are cached
......@@ -1099,9 +1099,6 @@ void LayerRendererChromium::finishDrawingFrame()
m_renderSurfaceTextureManager->setPreferredMemoryLimitBytes(preferredLimit);
m_renderSurfaceTextureManager->reduceMemoryToLimit(preferredLimit);
m_renderSurfaceTextureManager->deleteEvictedTextures(m_renderSurfaceTextureAllocator.get());
if (settings().compositeOffscreen)
copyOffscreenTextureToDisplay();
}
void LayerRendererChromium::toGLMatrix(float* flattened, const TransformationMatrix& m)
......@@ -1290,29 +1287,6 @@ bool LayerRendererChromium::getFramebufferTexture(ManagedTexture* texture, const
return true;
}
ManagedTexture* LayerRendererChromium::getOffscreenLayerTexture()
{
return settings().compositeOffscreen && rootLayer() ? rootLayer()->renderSurface()->contentsTexture() : 0;
}
void LayerRendererChromium::copyOffscreenTextureToDisplay()
{
if (settings().compositeOffscreen) {
makeContextCurrent();
useRenderSurface(0);
TransformationMatrix drawTransform;
drawTransform.translate3d(0.5 * m_defaultRenderSurface->contentRect().width(), 0.5 * m_defaultRenderSurface->contentRect().height(), 0);
m_defaultRenderSurface->setDrawTransform(drawTransform);
m_defaultRenderSurface->setDrawOpacity(1);
m_defaultRenderSurface->setScissorRect(this, m_defaultRenderSurface->contentRect());
if (m_defaultRenderSurface->hasReplica())
m_defaultRenderSurface->drawReplica(this);
m_defaultRenderSurface->drawContents(this);
}
}
bool LayerRendererChromium::isCurrentRenderSurface(CCRenderSurface* renderSurface)
{
// If renderSurface is 0, we can't tell if we are already using it, since m_currentRenderSurface is
......@@ -1325,12 +1299,9 @@ bool LayerRendererChromium::useRenderSurface(CCRenderSurface* renderSurface)
m_currentRenderSurface = renderSurface;
m_currentManagedTexture = 0;
if ((renderSurface == m_defaultRenderSurface && !settings().compositeOffscreen) || (!renderSurface && settings().compositeOffscreen)) {
if (renderSurface == m_defaultRenderSurface) {
GLC(m_context.get(), m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0));
if (renderSurface)
setDrawViewportRect(renderSurface->contentRect(), true);
else
setDrawViewportRect(m_defaultRenderSurface->contentRect(), true);
setDrawViewportRect(renderSurface->contentRect(), true);
return true;
}
......@@ -1381,7 +1352,7 @@ void LayerRendererChromium::setScissorToRect(const IntRect& scissorRect)
// of the GL scissor is the bottom of our layer.
// But, if rendering to offscreen texture, we reverse our sense of 'upside down'.
int scissorY;
if (isCurrentRenderSurface(m_defaultRenderSurface) && !settings().compositeOffscreen)
if (isCurrentRenderSurface(m_defaultRenderSurface))
scissorY = m_currentRenderSurface->contentRect().height() - (scissorRect.maxY() - m_currentRenderSurface->contentRect().y());
else
scissorY = scissorRect.y() - contentRect.y();
......
......@@ -186,7 +186,6 @@ private:
void drawTileQuad(const CCTileDrawQuad*);
void drawVideoQuad(const CCVideoDrawQuad*);
ManagedTexture* getOffscreenLayerTexture();
void copyPlaneToTexture(const CCVideoDrawQuad*, const void* plane, int index);
bool copyFrameToTextures(const CCVideoDrawQuad*);
template<class Program> void drawSingleTextureVideoQuad(const CCVideoDrawQuad*, Program*, float widthScaleFactor, Platform3DObject textureId, GC3Denum target);
......@@ -195,8 +194,6 @@ private:
void drawRGBA(const CCVideoDrawQuad*);
void drawYUV(const CCVideoDrawQuad*);
void copyOffscreenTextureToDisplay();
void setDrawViewportRect(const IntRect&, bool flipY);
// The current drawing target is either a RenderSurface or ManagedTexture. Use these functions to switch to a new drawing target.
......
......@@ -75,7 +75,6 @@ protected:
struct CCSettings {
CCSettings()
: acceleratePainting(false)
, compositeOffscreen(false)
, showFPSCounter(false)
, showPlatformLayerTree(false)
, refreshRate(0)
......@@ -85,7 +84,6 @@ struct CCSettings {
, maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) { }
bool acceleratePainting;
bool compositeOffscreen;
bool showFPSCounter;
bool showPlatformLayerTree;
double refreshRate;
......
2012-04-11 James Robinson <jamesr@chromium.org>
[chromium] Remove unused compositeToTexture / compositeOffscreen setting
https://bugs.webkit.org/show_bug.cgi?id=83733
Reviewed by Adrienne Walker.
Remove compositeOffscreen / compositeToTexture setting. This was an experiment that is no longer needed.
* public/WebSettings.h:
* src/WebLayerTreeView.cpp:
(WebKit::WebLayerTreeView::Settings::operator CCSettings):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::WebSettingsImpl):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
2012-04-13 James Robinson <jamesr@chromium.org>
[chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API
......@@ -111,8 +111,6 @@ public:
virtual void setAcceleratedCompositingEnabled(bool) = 0;
virtual void setForceCompositingMode(bool) = 0;
virtual void setMockScrollbarsEnabled(bool) = 0;
virtual void setCompositeToTextureEnabled(bool) = 0;
virtual bool compositeToTextureEnabled() const = 0;
virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool) = 0;
virtual void setAcceleratedCompositingForVideoEnabled(bool) = 0;
virtual void setAcceleratedCompositingForCanvasEnabled(bool) = 0;
......
......@@ -41,7 +41,6 @@ WebLayerTreeView::Settings::operator CCSettings() const
{
CCSettings settings;
settings.acceleratePainting = acceleratePainting;
settings.compositeOffscreen = compositeOffscreen;
settings.showFPSCounter = showFPSCounter;
settings.showPlatformLayerTree = showPlatformLayerTree;
settings.refreshRate = refreshRate;
......
......@@ -47,7 +47,6 @@ namespace WebKit {
WebSettingsImpl::WebSettingsImpl(Settings* settings)
: m_settings(settings)
, m_compositeToTextureEnabled(false)
, m_showFPSCounter(false)
, m_showPlatformLayerTree(false)
, m_viewportEnabled(false)
......@@ -355,11 +354,6 @@ void WebSettingsImpl::setMockScrollbarsEnabled(bool enabled)
m_settings->setMockScrollbarsEnabled(enabled);
}
void WebSettingsImpl::setCompositeToTextureEnabled(bool enabled)
{
m_compositeToTextureEnabled = enabled;
}
void WebSettingsImpl::setAcceleratedCompositingFor3DTransformsEnabled(bool enabled)
{
m_settings->setAcceleratedCompositingFor3DTransformsEnabled(enabled);
......
......@@ -103,8 +103,6 @@ public:
virtual void setAcceleratedCompositingEnabled(bool);
virtual void setForceCompositingMode(bool);
virtual void setMockScrollbarsEnabled(bool);
virtual void setCompositeToTextureEnabled(bool);
virtual bool compositeToTextureEnabled() const { return m_compositeToTextureEnabled; }
virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool);
virtual void setAcceleratedCompositingForVideoEnabled(bool);
virtual void setAcceleratedCompositingForPluginsEnabled(bool);
......@@ -146,7 +144,6 @@ public:
private:
WebCore::Settings* m_settings;
bool m_compositeToTextureEnabled;
bool m_showFPSCounter;
bool m_showPlatformLayerTree;
bool m_viewportEnabled;
......
......@@ -3269,7 +3269,6 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
WebLayerTreeView::Settings layerTreeViewSettings;
layerTreeViewSettings.acceleratePainting = page()->settings()->acceleratedDrawingEnabled();
layerTreeViewSettings.compositeOffscreen = settings()->compositeToTextureEnabled();
layerTreeViewSettings.showFPSCounter = settings()->showFPSCounter();
layerTreeViewSettings.showPlatformLayerTree = settings()->showPlatformLayerTree();
......
2012-04-11 James Robinson <jamesr@chromium.org>
[chromium] Remove unused compositeToTexture / compositeOffscreen setting
https://bugs.webkit.org/show_bug.cgi?id=83733
Reviewed by Adrienne Walker.
Remove compositeOffscreen / compositeToTexture setting. This was an experiment that is no longer needed.
* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::resetWebSettings):
* DumpRenderTree/chromium/TestShell.h:
(TestShell):
* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):
(WebPreferences::applyTo):
* DumpRenderTree/chromium/WebPreferences.h:
(WebPreferences):
2012-04-13 Ryosuke Niwa <rniwa@webkit.org>
webkitpy build fix. Revert the debug change (number of runs was 2 instead of 20),
......@@ -60,7 +60,6 @@ static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-c
static const char optionEnableDeferred2DCanvas[] = "--enable-deferred-2d-canvas";
static const char optionEnableAcceleratedPainting[] = "--enable-accelerated-painting";
static const char optionEnableAcceleratedCompositingForVideo[] = "--enable-accelerated-video";
static const char optionEnableCompositeToTexture[] = "--enable-composite-to-texture";
static const char optionUseGraphicsContext3DImplementation[] = "--use-graphics-context-3d-implementation=";
static const char optionEnablePerTilePainting[] = "--enable-per-tile-painting";
......@@ -142,7 +141,6 @@ int main(int argc, char* argv[])
bool startupDialog = false;
bool acceleratedCompositingForVideoEnabled = false;
bool threadedCompositingEnabled = false;
bool compositeToTexture = false;
bool forceCompositingMode = false;
bool accelerated2DCanvasEnabled = false;
bool deferred2DCanvasEnabled = false;
......@@ -183,8 +181,6 @@ int main(int argc, char* argv[])
acceleratedCompositingForVideoEnabled = true;
else if (argument == optionEnableThreadedCompositing)
threadedCompositingEnabled = true;
else if (argument == optionEnableCompositeToTexture)
compositeToTexture = true;
else if (argument == optionForceCompositingMode)
forceCompositingMode = true;
else if (argument == optionEnableAccelerated2DCanvas)
......@@ -239,7 +235,6 @@ int main(int argc, char* argv[])
shell.setAllowExternalPages(allowExternalPages);
shell.setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
shell.setThreadedCompositingEnabled(threadedCompositingEnabled);
shell.setCompositeToTexture(compositeToTexture);
shell.setForceCompositingMode(forceCompositingMode);
shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
shell.setDeferred2dCanvasEnabled(deferred2DCanvasEnabled);
......
......@@ -107,7 +107,6 @@ TestShell::TestShell()
, m_allowExternalPages(false)
, m_acceleratedCompositingForVideoEnabled(false)
, m_threadedCompositingEnabled(false)
, m_compositeToTexture(false)
, m_forceCompositingMode(false)
, m_accelerated2dCanvasEnabled(false)
, m_deferred2dCanvasEnabled(false)
......@@ -220,7 +219,6 @@ void TestShell::resetWebSettings(WebView& webView)
m_prefs.reset();
m_prefs.acceleratedCompositingEnabled = true;
m_prefs.acceleratedCompositingForVideoEnabled = m_acceleratedCompositingForVideoEnabled;
m_prefs.compositeToTexture = m_compositeToTexture;
m_prefs.forceCompositingMode = m_forceCompositingMode;
m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
m_prefs.deferred2dCanvasEnabled = m_deferred2dCanvasEnabled;
......
......@@ -135,7 +135,6 @@ public:
void setTestShellMode(bool testShellMode) { m_testShellMode = testShellMode; }
void setAcceleratedCompositingForVideoEnabled(bool enabled) { m_acceleratedCompositingForVideoEnabled = enabled; }
void setThreadedCompositingEnabled(bool enabled) { m_threadedCompositingEnabled = enabled; }
void setCompositeToTexture(bool enabled) { m_compositeToTexture = enabled; }
void setForceCompositingMode(bool enabled) { m_forceCompositingMode = enabled; }
void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
void setDeferred2dCanvasEnabled(bool enabled) { m_deferred2dCanvasEnabled = enabled; }
......@@ -227,7 +226,6 @@ private:
bool m_allowExternalPages;
bool m_acceleratedCompositingForVideoEnabled;
bool m_threadedCompositingEnabled;
bool m_compositeToTexture;
bool m_forceCompositingMode;
bool m_accelerated2dCanvasEnabled;
bool m_deferred2dCanvasEnabled;
......
......@@ -111,7 +111,6 @@ void WebPreferences::reset()
hyperlinkAuditingEnabled = false;
acceleratedCompositingForVideoEnabled = false;
acceleratedCompositingEnabled = false;
compositeToTexture = false;
accelerated2dCanvasEnabled = false;
deferred2dCanvasEnabled = false;
acceleratedPaintingEnabled = false;
......@@ -220,7 +219,6 @@ void WebPreferences::applyTo(WebView* webView)
settings->setCaretBrowsingEnabled(caretBrowsingEnabled);
settings->setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
settings->setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
settings->setCompositeToTextureEnabled(compositeToTexture);
settings->setForceCompositingMode(forceCompositingMode);
settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
settings->setDeferred2dCanvasEnabled(deferred2dCanvasEnabled);
......
......@@ -104,7 +104,6 @@ struct WebPreferences {
bool caretBrowsingEnabled;
bool acceleratedCompositingForVideoEnabled;
bool acceleratedCompositingEnabled;
bool compositeToTexture;
bool forceCompositingMode;
bool accelerated2dCanvasEnabled;
bool deferred2dCanvasEnabled;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment