webkit: Cleanup - make everything private as much as possible.
This helps to reduce the public surface of this API and makes clear what can be accessed by the clients/consumers of this API. BUG=338338 TEST=None R=piman@chromium.org Review URL: https://codereview.chromium.org/858643002 Cr-Commit-Position: refs/heads/master@{#311976}
This commit is contained in:
ui/compositor/test
webkit/common/gpu
@ -15,7 +15,7 @@ class Thread;
|
||||
|
||||
namespace webkit {
|
||||
namespace gpu {
|
||||
class ContextProviderInProcess;
|
||||
class ContextProviderWebContext;
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ class InProcessContextFactory : public ContextFactory {
|
||||
|
||||
private:
|
||||
scoped_ptr<base::Thread> compositor_thread_;
|
||||
scoped_refptr<webkit::gpu::ContextProviderInProcess>
|
||||
scoped_refptr<webkit::gpu::ContextProviderWebContext>
|
||||
shared_main_thread_contexts_;
|
||||
cc::TestSharedBitmapManager shared_bitmap_manager_;
|
||||
cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
|
||||
|
@ -8,9 +8,9 @@
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/callback_helpers.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "cc/output/managed_memory_policy.h"
|
||||
#include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h"
|
||||
#include "gpu/command_buffer/client/gles2_implementation.h"
|
||||
#include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h"
|
||||
|
||||
|
@ -5,16 +5,21 @@
|
||||
#ifndef WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
|
||||
#define WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/threading/thread_checker.h"
|
||||
#include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h"
|
||||
#include "webkit/common/gpu/context_provider_web_context.h"
|
||||
#include "webkit/common/gpu/webkit_gpu_export.h"
|
||||
|
||||
namespace blink { class WebGraphicsContext3D; }
|
||||
|
||||
namespace gpu_blink {
|
||||
class WebGraphicsContext3DInProcessCommandBufferImpl;
|
||||
}
|
||||
|
||||
namespace webkit {
|
||||
namespace gpu {
|
||||
class GrContextForWebGraphicsContext3D;
|
||||
@ -31,8 +36,17 @@ class WEBKIT_GPU_EXPORT ContextProviderInProcess
|
||||
static scoped_refptr<ContextProviderInProcess> CreateOffscreen(
|
||||
bool lose_context_when_out_of_memory);
|
||||
|
||||
private:
|
||||
ContextProviderInProcess(
|
||||
scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
|
||||
context3d,
|
||||
const std::string& debug_name);
|
||||
~ContextProviderInProcess() override;
|
||||
|
||||
// ContextProviderWebContext:
|
||||
blink::WebGraphicsContext3D* WebContext3D() override;
|
||||
|
||||
// cc::ContextProvider:
|
||||
bool BindToCurrentThread() override;
|
||||
Capabilities ContextCapabilities() override;
|
||||
::gpu::gles2::GLES2Interface* ContextGL() override;
|
||||
@ -48,16 +62,7 @@ class WEBKIT_GPU_EXPORT ContextProviderInProcess
|
||||
const MemoryPolicyChangedCallback& memory_policy_changed_callback)
|
||||
override;
|
||||
|
||||
protected:
|
||||
ContextProviderInProcess(
|
||||
scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
|
||||
context3d,
|
||||
const std::string& debug_name);
|
||||
~ContextProviderInProcess() override;
|
||||
|
||||
void OnLostContext();
|
||||
|
||||
private:
|
||||
void InitializeCapabilities();
|
||||
|
||||
base::ThreadChecker main_thread_checker_;
|
||||
@ -65,7 +70,7 @@ class WEBKIT_GPU_EXPORT ContextProviderInProcess
|
||||
|
||||
scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
|
||||
context3d_;
|
||||
scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_;
|
||||
scoped_ptr<GrContextForWebGraphicsContext3D> gr_context_;
|
||||
|
||||
LostContextCallback lost_context_callback_;
|
||||
|
||||
|
Reference in New Issue
Block a user