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

Side by Side Diff: content/browser/renderer_host/image_transport_factory_android.cc

Issue 17447007: Change WGC3DInProcessCBImpl factories to return a base class pointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/image_transport_factory_android.h" 5 #include "content/browser/renderer_host/image_transport_factory_android.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
10 #include "content/browser/renderer_host/compositor_impl_android.h" 10 #include "content/browser/renderer_host/compositor_impl_android.h"
(...skipping 29 matching lines...) Expand all
40 virtual void AcquireTexture( 40 virtual void AcquireTexture(
41 uint32 texture_id, const signed char* mailbox_name) OVERRIDE {} 41 uint32 texture_id, const signed char* mailbox_name) OVERRIDE {}
42 virtual void ReleaseTexture( 42 virtual void ReleaseTexture(
43 uint32 texture_id, const signed char* mailbox_name) OVERRIDE {} 43 uint32 texture_id, const signed char* mailbox_name) OVERRIDE {}
44 virtual WebKit::WebGraphicsContext3D* GetContext3D() OVERRIDE { 44 virtual WebKit::WebGraphicsContext3D* GetContext3D() OVERRIDE {
45 return context_.get(); 45 return context_.get();
46 } 46 }
47 virtual GLHelper* GetGLHelper() OVERRIDE { return NULL; } 47 virtual GLHelper* GetGLHelper() OVERRIDE { return NULL; }
48 48
49 private: 49 private:
50 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context_; 50 scoped_ptr<WebKit::WebGraphicsContext3D> context_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(DirectGLImageTransportFactory); 52 DISALLOW_COPY_AND_ASSIGN(DirectGLImageTransportFactory);
53 }; 53 };
54 54
55 DirectGLImageTransportFactory::DirectGLImageTransportFactory() { 55 DirectGLImageTransportFactory::DirectGLImageTransportFactory() {
56 WebKit::WebGraphicsContext3D::Attributes attrs; 56 WebKit::WebGraphicsContext3D::Attributes attrs;
57 attrs.shareResources = true; 57 attrs.shareResources = true;
58 attrs.noAutomaticFlushes = true; 58 attrs.noAutomaticFlushes = true;
59 context_.reset(webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: 59 context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl::
60 CreateViewContext(attrs, NULL)); 60 CreateViewContext(attrs, NULL);
61 if (context_->makeContextCurrent()) 61 if (context_->makeContextCurrent())
62 context_->pushGroupMarkerEXT( 62 context_->pushGroupMarkerEXT(
63 base::StringPrintf("DirectGLImageTransportFactory-%p", this).c_str()); 63 base::StringPrintf("DirectGLImageTransportFactory-%p", this).c_str());
64 } 64 }
65 65
66 DirectGLImageTransportFactory::~DirectGLImageTransportFactory() { 66 DirectGLImageTransportFactory::~DirectGLImageTransportFactory() {
67 } 67 }
68 68
69 class CmdBufferImageTransportFactory : public ImageTransportFactoryAndroid { 69 class CmdBufferImageTransportFactory : public ImageTransportFactoryAndroid {
70 public: 70 public:
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return g_factory; 200 return g_factory;
201 } 201 }
202 202
203 ImageTransportFactoryAndroid::ImageTransportFactoryAndroid() { 203 ImageTransportFactoryAndroid::ImageTransportFactoryAndroid() {
204 } 204 }
205 205
206 ImageTransportFactoryAndroid::~ImageTransportFactoryAndroid() { 206 ImageTransportFactoryAndroid::~ImageTransportFactoryAndroid() {
207 } 207 }
208 208
209 } // namespace content 209 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/image_transport_factory.cc ('k') | content/common/gpu/client/gl_helper_benchmark.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698