[chromium] Use WebGraphicsContext3D in rate limiting logic inside compositor
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jun 2012 23:12:28 +0000 (23:12 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jun 2012 23:12:28 +0000 (23:12 +0000)
commitab6c67ab4182981582260444ed38c65bedb6f016
treefce2b0c338e4326493fabd27d900a50242b2d32a
parent44dd73dbad23d90a491771a69789bddecc21ae9d
[chromium] Use WebGraphicsContext3D in rate limiting logic inside compositor
https://bugs.webkit.org/show_bug.cgi?id=86259

Reviewed by Adrienne Walker.

This refactors the compositor's rate limiting implementation to use the Platform API's WebGraphicsContext3D
directly instead of WebCore::GraphicsContext3D to cut down on the number of spurious WebCore dependencies in the
compositor.  The one change in contract is that the caller to CCLayerTreeHost::startRateLimit() now has to call
CCLayerTreeHost::stopRateLimit() before allowing the referenced context to go away since CCLayerTreeHost no
longer retains a reference, but this was always happening already.

* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::setNeedsDisplayRect):
* platform/graphics/chromium/RateLimiter.cpp:
(WebCore::RateLimiter::create):
(WebCore::RateLimiter::RateLimiter):
(WebCore::RateLimiter::start):
(WebCore::RateLimiter::rateLimitContext):
* platform/graphics/chromium/RateLimiter.h:
(WebKit):
(RateLimiter):
* platform/graphics/chromium/TextureLayerChromium.cpp:
(WebCore::TextureLayerChromium::~TextureLayerChromium):
(WebCore::TextureLayerChromium::setRateLimitContext):
(WebCore::TextureLayerChromium::setNeedsDisplayRect):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::startRateLimiter):
(WebCore::CCLayerTreeHost::stopRateLimiter):
(WebCore::CCLayerTreeHost::rateLimit):
(WebCore):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/RateLimiter.cpp
Source/WebCore/platform/graphics/chromium/RateLimiter.h
Source/WebCore/platform/graphics/chromium/TextureLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h