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

Unified Diff: services/ui/surfaces/surfaces_context_provider.h

Issue 2481263002: Introduce Display Compositor mojo interface. Use InProcessContextProvider. (Closed)
Patch Set: Speculative fix for android build issue Created 4 years, 1 month 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: services/ui/surfaces/surfaces_context_provider.h
diff --git a/services/ui/surfaces/surfaces_context_provider.h b/services/ui/surfaces/surfaces_context_provider.h
deleted file mode 100644
index 752f47a09b3d2645a6522660ed3881ff0cb5cb0c..0000000000000000000000000000000000000000
--- a/services/ui/surfaces/surfaces_context_provider.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_UI_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
-#define SERVICES_UI_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
-
-#include <stdint.h>
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/threading/non_thread_safe.h"
-#include "cc/output/context_provider.h"
-#include "ui/gfx/native_widget_types.h"
-#include "ui/gl/gl_surface.h"
-
-namespace base {
-class SingleThreadTaskRunner;
-}
-
-namespace gpu {
-
-class CommandBufferProxyImpl;
-class GpuChannelHost;
-struct GpuProcessHostedCALayerTreeParamsMac;
-class TransferBuffer;
-
-namespace gles2 {
-class GLES2CmdHelper;
-class GLES2Implementation;
-}
-
-} // namespace gpu
-
-namespace ui {
-class LatencyInfo;
-}
-
-namespace ui {
-
-class CommandBufferDriver;
-class CommandBufferImpl;
-class SurfacesContextProviderDelegate;
-
-// TODO(fsamuel): This can probably be merged with ContextProviderCommandBuffer.
-class SurfacesContextProvider : public cc::ContextProvider,
- public base::NonThreadSafe {
- public:
- SurfacesContextProvider(gfx::AcceleratedWidget widget,
- scoped_refptr<gpu::GpuChannelHost> gpu_channel);
-
- void SetDelegate(SurfacesContextProviderDelegate* delegate);
-
- // cc::ContextProvider implementation.
- bool BindToCurrentThread() override;
- gpu::gles2::GLES2Interface* ContextGL() override;
- gpu::ContextSupport* ContextSupport() override;
- class GrContext* GrContext() override;
- cc::ContextCacheController* CacheController() override;
- void InvalidateGrContext(uint32_t state) override;
- gpu::Capabilities ContextCapabilities() override;
- void SetLostContextCallback(
- const LostContextCallback& lost_context_callback) override;
- base::Lock* GetLock() override;
-
- // SurfacesContextProvider API.
- void SetSwapBuffersCompletionCallback(
- gl::GLSurface::SwapCompletionCallback callback);
-
- protected:
- friend class base::RefCountedThreadSafe<SurfacesContextProvider>;
- ~SurfacesContextProvider() override;
-
- private:
- // Callbacks for CommandBufferProxyImpl:
- void OnGpuSwapBuffersCompleted(
- const std::vector<ui::LatencyInfo>& latency_info,
- gfx::SwapResult result,
- const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac);
- void OnUpdateVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval);
-
- // From GLES2Context:
- // Initialized in BindToCurrentThread.
- std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
- std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
- std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_;
- std::unique_ptr<cc::ContextCacheController> cache_controller_;
-
- gpu::Capabilities capabilities_;
- LostContextCallback lost_context_callback_;
-
- SurfacesContextProviderDelegate* delegate_;
- gfx::AcceleratedWidget widget_;
- std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_proxy_impl_;
- gl::GLSurface::SwapCompletionCallback swap_buffers_completion_callback_;
- scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider);
-};
-
-} // namespace ui
-
-#endif // SERVICES_UI_SURFACES_SURFACES_CONTEXT_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698