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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 126093010: Use ContextProvider subclass to provide WGC3D pointers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 6072 matching lines...) Expand 10 before | Expand all | Expand 10 after
6083 LOG(ERROR) << "Failed to establish GPU channel for media player"; 6083 LOG(ERROR) << "Failed to establish GPU channel for media player";
6084 return NULL; 6084 return NULL;
6085 } 6085 }
6086 6086
6087 scoped_ptr<StreamTextureFactory> stream_texture_factory; 6087 scoped_ptr<StreamTextureFactory> stream_texture_factory;
6088 if (UsingSynchronousRendererCompositor()) { 6088 if (UsingSynchronousRendererCompositor()) {
6089 SynchronousCompositorFactory* factory = 6089 SynchronousCompositorFactory* factory =
6090 SynchronousCompositorFactory::GetInstance(); 6090 SynchronousCompositorFactory::GetInstance();
6091 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_); 6091 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_);
6092 } else { 6092 } else {
6093 scoped_refptr<cc::ContextProvider> context_provider = 6093 scoped_refptr<webkit::gpu::ContextProviderWebContext> context_provider =
6094 RenderThreadImpl::current()->SharedMainThreadContextProvider(); 6094 RenderThreadImpl::current()->SharedMainThreadContextProvider();
6095 6095
6096 if (!context_provider.get()) { 6096 if (!context_provider.get()) {
6097 LOG(ERROR) << "Failed to get context3d for media player"; 6097 LOG(ERROR) << "Failed to get context3d for media player";
6098 return NULL; 6098 return NULL;
6099 } 6099 }
6100 6100
6101 stream_texture_factory.reset(new StreamTextureFactoryImpl( 6101 stream_texture_factory.reset(new StreamTextureFactoryImpl(
6102 context_provider->Context3d(), gpu_channel_host, routing_id_)); 6102 context_provider->WebContext3D(), gpu_channel_host, routing_id_));
6103 } 6103 }
6104 6104
6105 scoped_ptr<WebMediaPlayerAndroid> web_media_player_android( 6105 scoped_ptr<WebMediaPlayerAndroid> web_media_player_android(
6106 new WebMediaPlayerAndroid( 6106 new WebMediaPlayerAndroid(
6107 frame, 6107 frame,
6108 client, 6108 client,
6109 AsWeakPtr(), 6109 AsWeakPtr(),
6110 media_player_manager_, 6110 media_player_manager_,
6111 stream_texture_factory.release(), 6111 stream_texture_factory.release(),
6112 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), 6112 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(),
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
6364 for (size_t i = 0; i < icon_urls.size(); i++) { 6364 for (size_t i = 0; i < icon_urls.size(); i++) {
6365 WebURL url = icon_urls[i].iconURL(); 6365 WebURL url = icon_urls[i].iconURL();
6366 if (!url.isEmpty()) 6366 if (!url.isEmpty())
6367 urls.push_back(FaviconURL(url, 6367 urls.push_back(FaviconURL(url,
6368 ToFaviconType(icon_urls[i].iconType()))); 6368 ToFaviconType(icon_urls[i].iconType())));
6369 } 6369 }
6370 SendUpdateFaviconURL(urls); 6370 SendUpdateFaviconURL(urls);
6371 } 6371 }
6372 6372
6373 } // namespace content 6373 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698