diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebKit/chromium/src/WebExternalTextureLayer.cpp | |
parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebKit/chromium/src/WebExternalTextureLayer.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebExternalTextureLayer.cpp | 54 |
1 files changed, 14 insertions, 40 deletions
diff --git a/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp b/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp index c9ba0bc7b..8f7b58a9d 100644 --- a/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp +++ b/Source/WebKit/chromium/src/WebExternalTextureLayer.cpp @@ -24,67 +24,41 @@ */ #include "config.h" -#include "platform/WebExternalTextureLayer.h" +#include <public/WebExternalTextureLayer.h> -#include "platform/WebFloatRect.h" -#include "WebExternalTextureLayerImpl.h" +#include "TextureLayerChromium.h" +#include <public/WebFloatRect.h> +#include <public/WebSize.h> + +using namespace WebCore; namespace WebKit { WebExternalTextureLayer WebExternalTextureLayer::create() { - return WebExternalTextureLayer(WebExternalTextureLayerImpl::create()); + RefPtr<TextureLayerChromium> layer = TextureLayerChromium::create(0); + layer->setIsDrawable(true); + return WebExternalTextureLayer(layer.release()); } void WebExternalTextureLayer::setTextureId(unsigned id) { - unwrap<WebExternalTextureLayerImpl>()->setTextureId(id); -} - -unsigned WebExternalTextureLayer::textureId() const -{ - return constUnwrap<WebExternalTextureLayerImpl>()->textureId(); + unwrap<TextureLayerChromium>()->setTextureId(id); } void WebExternalTextureLayer::setFlipped(bool flipped) { - unwrap<WebExternalTextureLayerImpl>()->setFlipped(flipped); -} - -bool WebExternalTextureLayer::flipped() const -{ - return constUnwrap<WebExternalTextureLayerImpl>()->flipped(); + unwrap<TextureLayerChromium>()->setFlipped(flipped); } void WebExternalTextureLayer::setUVRect(const WebFloatRect& rect) { - unwrap<WebExternalTextureLayerImpl>()->setUVRect(rect); -} - -WebFloatRect WebExternalTextureLayer::uvRect() const -{ - return WebFloatRect(constUnwrap<WebExternalTextureLayerImpl>()->uvRect()); -} - -void WebExternalTextureLayer::invalidateRect(const WebFloatRect& updateRect) -{ - unwrap<WebExternalTextureLayerImpl>()->setNeedsDisplayRect(updateRect); -} - -WebExternalTextureLayer::WebExternalTextureLayer(const PassRefPtr<WebExternalTextureLayerImpl>& node) - : WebLayer(node) -{ -} - -WebExternalTextureLayer& WebExternalTextureLayer::operator=(const PassRefPtr<WebExternalTextureLayerImpl>& node) -{ - m_private = node; - return *this; + unwrap<TextureLayerChromium>()->setUVRect(rect); } -WebExternalTextureLayer::operator PassRefPtr<WebExternalTextureLayerImpl>() const +WebExternalTextureLayer::WebExternalTextureLayer(PassRefPtr<TextureLayerChromium> layer) + : WebLayer(layer) { - return static_cast<WebExternalTextureLayerImpl*>(m_private.get()); } } // namespace WebKit |