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

Unified Diff: content/browser/renderer_host/compositor_impl_android.h

Issue 2686243002: content/ui[Android]: Remove ContextProviderFactory. (Closed)
Patch Set: Addressed comments. Created 3 years, 10 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
Index: content/browser/renderer_host/compositor_impl_android.h
diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h
index 6d49a396a9d8be47d62bc53da8db711ab1200ab8..b6d18a90ca46560e989373446e02afcd33d159b0 100644
--- a/content/browser/renderer_host/compositor_impl_android.h
+++ b/content/browser/renderer_host/compositor_impl_android.h
@@ -24,7 +24,6 @@
#include "gpu/ipc/common/surface_handle.h"
#include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
#include "third_party/khronos/GLES2/gl2.h"
-#include "ui/android/context_provider_factory.h"
#include "ui/android/resources/resource_manager_impl.h"
#include "ui/android/resources/ui_resource_provider.h"
#include "ui/android/window_android_compositor.h"
@@ -34,9 +33,11 @@ struct ANativeWindow;
namespace cc {
class AnimationHost;
class Display;
+class FrameSinkId;
class Layer;
class LayerTreeHost;
class OutputSurface;
+class SurfaceManager;
class VulkanContextProvider;
}
@@ -58,6 +59,9 @@ class CONTENT_EXPORT CompositorImpl
static bool IsInitialized();
+ static cc::SurfaceManager* GetSurfaceManager();
+ static cc::FrameSinkId AllocateFrameSinkId();
+
// ui::ResourceProvider implementation.
cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override;
void DeleteUIResource(cc::UIResourceId resource_id) override;
@@ -115,8 +119,8 @@ class CONTENT_EXPORT CompositorImpl
void CreateVulkanOutputSurface();
#endif
void OnGpuChannelEstablished(
- scoped_refptr<gpu::GpuChannelHost> gpu_channel_host,
- ui::ContextProviderFactory::GpuChannelHostResult result);
+ scoped_refptr<gpu::GpuChannelHost> gpu_channel_host);
+ void OnGpuChannelTimeout();
void InitializeDisplay(
std::unique_ptr<cc::OutputSurface> display_output_surface,
scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider,
@@ -160,6 +164,9 @@ class CONTENT_EXPORT CompositorImpl
size_t num_successive_context_creation_failures_;
+ size_t num_successive_gpu_initialization_failures_;
+ base::OneShotTimer establish_gpu_channel_timeout_;
+
// Whether there is an CompositorFrameSink request pending from the current
// |host_|. Becomes |true| if RequestNewCompositorFrameSink is called, and
// |false| if |host_| is deleted or we succeed in creating *and* initializing

Powered by Google App Engine
This is Rietveld 408576698