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

Side by Side Diff: webkit/compositor_bindings/WebExternalTextureLayerImpl.cpp

Issue 11142031: Remove WTF dependencies from webkit_compositor_bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "WebExternalTextureLayerImpl.h" 6 #include "WebExternalTextureLayerImpl.h"
7 7
8 #include "CCTextureUpdateQueue.h"
9 #include "TextureLayerChromium.h"
10 #include "WebLayerImpl.h" 8 #include "WebLayerImpl.h"
9 #include "cc/texture_layer.h"
10 #include "cc/texture_update_queue.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayerClient.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
11 #include "webcore_convert.h" 14 #include "webcore_convert.h"
12 #include <public/WebExternalTextureLayerClient.h>
13 #include <public/WebFloatRect.h>
14 #include <public/WebSize.h>
15 15
16 using namespace cc; 16 using namespace cc;
17 17
18 namespace WebKit { 18 namespace WebKit {
19 19
20 WebExternalTextureLayer* WebExternalTextureLayer::create(WebExternalTextureLayer Client* client) 20 WebExternalTextureLayer* WebExternalTextureLayer::create(WebExternalTextureLayer Client* client)
21 { 21 {
22 return new WebExternalTextureLayerImpl(client); 22 return new WebExternalTextureLayerImpl(client);
23 } 23 }
24 24
25 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(WebExternalTextureLayer Client* client) 25 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(WebExternalTextureLayer Client* client)
26 : m_client(client) 26 : m_client(client)
27 { 27 {
28 scoped_refptr<TextureLayerChromium> layer; 28 scoped_refptr<TextureLayerChromium> layer;
29 if (m_client) 29 if (m_client)
30 layer = TextureLayerChromium::create(this); 30 layer = TextureLayerChromium::create(this);
31 else 31 else
32 layer = TextureLayerChromium::create(0); 32 layer = TextureLayerChromium::create(0);
33 layer->setIsDrawable(true); 33 layer->setIsDrawable(true);
34 m_layer = adoptPtr(new WebLayerImpl(layer)); 34 m_layer.reset(new WebLayerImpl(layer));
35 } 35 }
36 36
37 WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl() 37 WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl()
38 { 38 {
39 static_cast<TextureLayerChromium*>(m_layer->layer())->clearClient(); 39 static_cast<TextureLayerChromium*>(m_layer->layer())->clearClient();
40 } 40 }
41 41
42 WebLayer* WebExternalTextureLayerImpl::layer() 42 WebLayer* WebExternalTextureLayerImpl::layer()
43 { 43 {
44 return m_layer.get(); 44 return m_layer.get();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return m_client->prepareTexture(updaterImpl); 103 return m_client->prepareTexture(updaterImpl);
104 } 104 }
105 105
106 WebGraphicsContext3D* WebExternalTextureLayerImpl::context() 106 WebGraphicsContext3D* WebExternalTextureLayerImpl::context()
107 { 107 {
108 ASSERT(m_client); 108 ASSERT(m_client);
109 return m_client->context(); 109 return m_client->context();
110 } 110 }
111 111
112 } // namespace WebKit 112 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/WebExternalTextureLayerImpl.h ('k') | webkit/compositor_bindings/WebFloatAnimationCurveImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698