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

Unified Diff: content/test/test_render_view_host.cc

Issue 2299183002: Revert of content: Fix Context creation logic in ContextProviderFactoryImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/mock_gpu_channel_establish_factory.cc ('k') | ui/android/context_provider_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_render_view_host.cc
diff --git a/content/test/test_render_view_host.cc b/content/test/test_render_view_host.cc
index 7f59729fe37b5e37ea2d061dc7e163ec9983122d..ec9bea112b4c9ee1cb0d779b980a6ac530254a91 100644
--- a/content/test/test_render_view_host.cc
+++ b/content/test/test_render_view_host.cc
@@ -33,10 +33,6 @@
#include "ui/compositor/compositor.h"
#include "ui/gfx/geometry/rect.h"
-#if defined(OS_ANDROID)
-#include "content/browser/renderer_host/context_provider_factory_impl_android.h"
-#endif
-
namespace content {
void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params,
@@ -67,13 +63,10 @@
is_occluded_(false),
did_swap_compositor_frame_(false) {
#if defined(OS_ANDROID)
- // Not all tests initialize or need a context provider factory.
- if (ContextProviderFactoryImpl::GetInstance()) {
- surface_id_allocator_.reset(
- new cc::SurfaceIdAllocator(AllocateSurfaceClientId()));
- GetSurfaceManager()->RegisterSurfaceClientId(
- surface_id_allocator_->client_id());
- }
+ surface_id_allocator_.reset(
+ new cc::SurfaceIdAllocator(AllocateSurfaceClientId()));
+ GetSurfaceManager()->RegisterSurfaceClientId(
+ surface_id_allocator_->client_id());
#else
// Not all tests initialize or need an image transport factory.
if (ImageTransportFactory::GetInstance()) {
@@ -88,15 +81,9 @@
}
TestRenderWidgetHostView::~TestRenderWidgetHostView() {
- cc::SurfaceManager* manager = nullptr;
-#if defined(OS_ANDROID)
- if (ContextProviderFactoryImpl::GetInstance())
- manager = GetSurfaceManager();
-#else
- manager = GetSurfaceManager();
-#endif
- if (manager) {
- manager->InvalidateSurfaceClientId(surface_id_allocator_->client_id());
+ if (GetSurfaceManager()) {
+ GetSurfaceManager()->InvalidateSurfaceClientId(
+ surface_id_allocator_->client_id());
}
}
« no previous file with comments | « content/test/mock_gpu_channel_establish_factory.cc ('k') | ui/android/context_provider_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698