Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: webkit/compositor_bindings/web_external_texture_layer_impl.cc

Issue 12496013: Move compositor bindings implementations out of WebKit::, fix style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/compositor_bindings/web_external_texture_layer_impl.cc
diff --git a/webkit/compositor_bindings/web_external_texture_layer_impl.cc b/webkit/compositor_bindings/web_external_texture_layer_impl.cc
index ac888aa5da916f5ca05d97e9a2fd4633c040dbb3..0b270f4cb58cac3ee2e392485aefdfbd82754f70 100644
--- a/webkit/compositor_bindings/web_external_texture_layer_impl.cc
+++ b/webkit/compositor_bindings/web_external_texture_layer_impl.cc
@@ -11,12 +11,13 @@
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
#include "webkit/compositor_bindings/web_layer_impl.h"
-using namespace cc;
+using cc::TextureLayer;
+using cc::ResourceUpdateQueue;
-namespace WebKit {
+namespace webkit {
WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(
- WebExternalTextureLayerClient* client)
+ WebKit::WebExternalTextureLayerClient* client)
: client_(client) {
scoped_refptr<TextureLayer> layer;
if (client_)
@@ -31,7 +32,7 @@ WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl() {
static_cast<TextureLayer*>(layer_->layer())->ClearClient();
}
-WebLayer* WebExternalTextureLayerImpl::layer() { return layer_.get(); }
+WebKit::WebLayer* WebExternalTextureLayerImpl::layer() { return layer_.get(); }
void WebExternalTextureLayerImpl::setTextureId(unsigned id) {
static_cast<TextureLayer*>(layer_->layer())->SetTextureId(id);
@@ -41,7 +42,7 @@ void WebExternalTextureLayerImpl::setFlipped(bool flipped) {
static_cast<TextureLayer*>(layer_->layer())->SetFlipped(flipped);
}
-void WebExternalTextureLayerImpl::setUVRect(const WebFloatRect& rect) {
+void WebExternalTextureLayerImpl::setUVRect(const WebKit::WebFloatRect& rect) {
static_cast<TextureLayer*>(layer_->layer())->SetUV(
gfx::PointF(rect.x, rect.y),
gfx::PointF(rect.x + rect.width, rect.y + rect.height));
@@ -65,32 +66,32 @@ void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) {
static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit);
}
-class WebTextureUpdaterImpl : public WebTextureUpdater {
+class WebTextureUpdaterImpl : public WebKit::WebTextureUpdater {
public:
- explicit WebTextureUpdaterImpl(ResourceUpdateQueue& queue) : queue_(queue) {}
+ explicit WebTextureUpdaterImpl(ResourceUpdateQueue* queue) : queue_(queue) {}
virtual void appendCopy(unsigned source_texture,
unsigned destination_texture,
- WebSize size) OVERRIDE {
- TextureCopier::Parameters copy = { source_texture, destination_texture,
- size };
- queue_.appendCopy(copy);
+ WebKit::WebSize size) OVERRIDE {
+ cc::TextureCopier::Parameters copy = { source_texture, destination_texture,
+ size };
+ queue_->appendCopy(copy);
}
private:
- ResourceUpdateQueue& queue_;
+ ResourceUpdateQueue* queue_;
};
unsigned WebExternalTextureLayerImpl::prepareTexture(
ResourceUpdateQueue& queue) {
DCHECK(client_);
- WebTextureUpdaterImpl updater_impl(queue);
+ WebTextureUpdaterImpl updater_impl(&queue);
return client_->prepareTexture(updater_impl);
}
-WebGraphicsContext3D* WebExternalTextureLayerImpl::context() {
+WebKit::WebGraphicsContext3D* WebExternalTextureLayerImpl::context() {
DCHECK(client_);
return client_->context();
}
-} // namespace WebKit
+} // namespace webkit

Powered by Google App Engine
This is Rietveld 408576698