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

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

Issue 23234003: Support stream textures with the synchronous compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android clang Created 7 years, 4 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 #if defined(OS_ANDROID) 206 #if defined(OS_ANDROID)
207 #include <cpu-features.h> 207 #include <cpu-features.h>
208 208
209 #include "content/common/android/device_telephony_info.h" 209 #include "content/common/android/device_telephony_info.h"
210 #include "content/common/gpu/client/context_provider_command_buffer.h" 210 #include "content/common/gpu/client/context_provider_command_buffer.h"
211 #include "content/renderer/android/address_detector.h" 211 #include "content/renderer/android/address_detector.h"
212 #include "content/renderer/android/content_detector.h" 212 #include "content/renderer/android/content_detector.h"
213 #include "content/renderer/android/email_detector.h" 213 #include "content/renderer/android/email_detector.h"
214 #include "content/renderer/android/phone_number_detector.h" 214 #include "content/renderer/android/phone_number_detector.h"
215 #include "content/renderer/android/synchronous_compositor_factory.h"
215 #include "content/renderer/media/android/renderer_media_player_manager.h" 216 #include "content/renderer/media/android/renderer_media_player_manager.h"
216 #include "content/renderer/media/android/stream_texture_factory_android_impl.h" 217 #include "content/renderer/media/android/stream_texture_factory_android_impl.h"
217 #include "content/renderer/media/android/stream_texture_factory_android_synchron ous_impl.h"
218 #include "content/renderer/media/android/webmediaplayer_android.h" 218 #include "content/renderer/media/android/webmediaplayer_android.h"
219 #include "content/renderer/media/android/webmediaplayer_proxy_android.h" 219 #include "content/renderer/media/android/webmediaplayer_proxy_android.h"
220 #include "skia/ext/platform_canvas.h" 220 #include "skia/ext/platform_canvas.h"
221 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 221 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
222 #include "third_party/WebKit/public/platform/WebFloatRect.h" 222 #include "third_party/WebKit/public/platform/WebFloatRect.h"
223 #include "third_party/WebKit/public/web/WebHitTestResult.h" 223 #include "third_party/WebKit/public/web/WebHitTestResult.h"
224 #include "ui/gfx/rect_f.h" 224 #include "ui/gfx/rect_f.h"
225 225
226 #if defined(GOOGLE_TV) 226 #if defined(GOOGLE_TV)
227 #include "content/renderer/media/rtc_video_decoder_bridge_tv.h" 227 #include "content/renderer/media/rtc_video_decoder_bridge_tv.h"
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after
3030 return NULL; 3030 return NULL;
3031 } 3031 }
3032 3032
3033 if (!media_player_proxy_) { 3033 if (!media_player_proxy_) {
3034 media_player_proxy_ = new WebMediaPlayerProxyAndroid( 3034 media_player_proxy_ = new WebMediaPlayerProxyAndroid(
3035 this, media_player_manager_.get()); 3035 this, media_player_manager_.get());
3036 } 3036 }
3037 3037
3038 scoped_ptr<StreamTextureFactory> stream_texture_factory; 3038 scoped_ptr<StreamTextureFactory> stream_texture_factory;
3039 if (UsingSynchronousRendererCompositor()) { 3039 if (UsingSynchronousRendererCompositor()) {
3040 stream_texture_factory.reset(new StreamTextureFactorySynchronousImpl); 3040 SynchronousCompositorFactory* factory =
3041 SynchronousCompositorFactory::GetInstance();
3042 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_);
3041 } else { 3043 } else {
3042 stream_texture_factory.reset(new StreamTextureFactoryImpl( 3044 stream_texture_factory.reset(new StreamTextureFactoryImpl(
3043 context_provider->Context3d(), gpu_channel_host, routing_id_)); 3045 context_provider->Context3d(), gpu_channel_host, routing_id_));
3044 } 3046 }
3045 3047
3046 scoped_ptr<WebMediaPlayerAndroid> web_media_player_android( 3048 scoped_ptr<WebMediaPlayerAndroid> web_media_player_android(
3047 new WebMediaPlayerAndroid( 3049 new WebMediaPlayerAndroid(
3048 frame, 3050 frame,
3049 client, 3051 client,
3050 AsWeakPtr(), 3052 AsWeakPtr(),
(...skipping 3485 matching lines...) Expand 10 before | Expand all | Expand 10 after
6536 WebURL url = icon_urls[i].iconURL(); 6538 WebURL url = icon_urls[i].iconURL();
6537 if (!url.isEmpty()) 6539 if (!url.isEmpty())
6538 urls.push_back(FaviconURL(url, 6540 urls.push_back(FaviconURL(url,
6539 ToFaviconType(icon_urls[i].iconType()))); 6541 ToFaviconType(icon_urls[i].iconType())));
6540 } 6542 }
6541 SendUpdateFaviconURL(urls); 6543 SendUpdateFaviconURL(urls);
6542 } 6544 }
6543 6545
6544 6546
6545 } // namespace content 6547 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698