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

Side by Side Diff: webkit/compositor_bindings/web_external_texture_layer_impl.cc

Issue 11231017: Remove ::create factory functions from objects created via WebCompositorSupport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes Created 8 years, 1 month 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 "web_external_texture_layer_impl.h" 5 #include "web_external_texture_layer_impl.h"
6 6
7 #include "cc/resource_update_queue.h" 7 #include "cc/resource_update_queue.h"
8 #include "cc/texture_layer.h" 8 #include "cc/texture_layer.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayerClient.h" 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayerClient.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
12 #include "web_layer_impl.h" 12 #include "web_layer_impl.h"
13 13
14 using namespace cc; 14 using namespace cc;
15 15
16 namespace WebKit { 16 namespace WebKit {
17 17
18 WebExternalTextureLayer* WebExternalTextureLayer::create(WebExternalTextureLayer Client* client)
19 {
20 return new WebExternalTextureLayerImpl(client);
21 }
22
23 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(WebExternalTextureLayer Client* client) 18 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(WebExternalTextureLayer Client* client)
24 : m_client(client) 19 : m_client(client)
25 { 20 {
26 scoped_refptr<TextureLayer> layer; 21 scoped_refptr<TextureLayer> layer;
27 if (m_client) 22 if (m_client)
28 layer = TextureLayer::create(this); 23 layer = TextureLayer::create(this);
29 else 24 else
30 layer = TextureLayer::create(0); 25 layer = TextureLayer::create(0);
31 layer->setIsDrawable(true); 26 layer->setIsDrawable(true);
32 m_layer.reset(new WebLayerImpl(layer)); 27 m_layer.reset(new WebLayerImpl(layer));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return m_client->prepareTexture(updaterImpl); 96 return m_client->prepareTexture(updaterImpl);
102 } 97 }
103 98
104 WebGraphicsContext3D* WebExternalTextureLayerImpl::context() 99 WebGraphicsContext3D* WebExternalTextureLayerImpl::context()
105 { 100 {
106 DCHECK(m_client); 101 DCHECK(m_client);
107 return m_client->context(); 102 return m_client->context();
108 } 103 }
109 104
110 } // namespace WebKit 105 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_content_layer_impl.cc ('k') | webkit/compositor_bindings/web_float_animation_curve_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698