diff options
Diffstat (limited to 'content/renderer')
3 files changed, 0 insertions, 139 deletions
diff --git a/content/renderer/android/synchronous_compositor_output_surface.cc b/content/renderer/android/synchronous_compositor_output_surface.cc deleted file mode 100644 index 87792ea..0000000 --- a/content/renderer/android/synchronous_compositor_output_surface.cc +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2013 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. - -#include "content/renderer/android/synchronous_compositor_output_surface.h" - -#include "base/logging.h" -#include "cc/output/output_surface_client.h" -#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" -#include "content/public/renderer/android/synchronous_compositor_client.h" -#include "content/public/renderer/content_renderer_client.h" -#include "skia/ext/refptr.h" -#include "third_party/skia/include/core/SkCanvas.h" -#include "third_party/skia/include/core/SkPicture.h" - -namespace content { - -SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface( - int32 routing_id, - WebGraphicsContext3DCommandBufferImpl* context) - : cc::OutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D>(context)), - compositor_client_(NULL), - routing_id_(routing_id) { - // WARNING: may be called on any thread. -} - -SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() { - DCHECK(CalledOnValidThread()); - if (compositor_client_) - compositor_client_->DidDestroyCompositor(this); -} - -bool SynchronousCompositorOutputSurface::BindToClient( - cc::OutputSurfaceClient* surface_client) { - DCHECK(CalledOnValidThread()); - if (!cc::OutputSurface::BindToClient(surface_client)) - return false; - GetContentClient()->renderer()->DidCreateSynchronousCompositor(routing_id_, - this); - return true; -} - -void SynchronousCompositorOutputSurface::SendFrameToParentCompositor( - cc::CompositorFrame* frame) { - // Intentional no-op: see http://crbug.com/237006 -} - -void SynchronousCompositorOutputSurface::SetClient( - SynchronousCompositorClient* compositor_client) { - DCHECK(CalledOnValidThread()); - compositor_client_ = compositor_client; -} - -bool SynchronousCompositorOutputSurface::DemandDrawSw(SkCanvas* canvas) { - DCHECK(CalledOnValidThread()); - NOTIMPLEMENTED(); // TODO(joth): call through to OutputSurfaceClient - return false; -} - -// Not using base::NonThreadSafe as we want to enforce a more exacting threading -// requirement: SynchronousCompositorOutputSurface() must only be used by -// embedders that supply their own compositor loop via -// OverrideCompositorMessageLoop(). -bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { - return base::MessageLoop::current() && (base::MessageLoop::current() == - GetContentClient()->renderer()->OverrideCompositorMessageLoop()); -} - -} // namespace content diff --git a/content/renderer/android/synchronous_compositor_output_surface.h b/content/renderer/android/synchronous_compositor_output_surface.h deleted file mode 100644 index 04af44f..0000000 --- a/content/renderer/android/synchronous_compositor_output_surface.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2013 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 CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ -#define CONTENT_RENDERER_ANDOIRD_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ - -#include "base/basictypes.h" -#include "base/compiler_specific.h" -#include "base/memory/scoped_ptr.h" -#include "cc/output/output_surface.h" -#include "content/public/renderer/android/synchronous_compositor.h" - -namespace content { - -class SynchronousCompositorClient; -class WebGraphicsContext3DCommandBufferImpl; - -// Specialization of the output surface that adapts it to implement the -// content::SynchronousCompositor public API. This class effects an "inversion -// of control" - enabling drawing to be orchestrated by the embedding -// layer, instead of driven by the compositor internals - hence it holds two -// 'client' pointers (including |client_| in the OutputSurface baseclass) which -// represent the consumers of the two roles in plays. -// This class can be created only on the main thread, but then becomes pinned -// to a fixed thread when BindToClient is called. -class SynchronousCompositorOutputSurface - : NON_EXPORTED_BASE(public cc::OutputSurface), - NON_EXPORTED_BASE(public SynchronousCompositor) { - public: - SynchronousCompositorOutputSurface( - int32 routing_id, - WebGraphicsContext3DCommandBufferImpl* context); - virtual ~SynchronousCompositorOutputSurface(); - - // OutputSurface. - virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; - virtual void SendFrameToParentCompositor(cc::CompositorFrame* frame) OVERRIDE; - - // SynchronousCompositor. - virtual void SetClient(SynchronousCompositorClient* compositor_client) - OVERRIDE; - virtual bool DemandDrawSw(SkCanvas* canvas) OVERRIDE; - - private: - bool CalledOnValidThread() const; - - SynchronousCompositorClient* compositor_client_; - int routing_id_; - - DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); -}; - -} // namespace content - -#endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index b681e5d..f8d3137 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -58,10 +58,6 @@ #include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" -#if defined(OS_ANDROID) -#include "content/renderer/android/synchronous_compositor_output_surface.h" -#endif - #if defined(OS_POSIX) #include "ipc/ipc_channel_posix.h" #include "third_party/skia/include/core/SkMallocPixelRef.h" @@ -585,16 +581,6 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() { if (!context) return scoped_ptr<cc::OutputSurface>(); -#if defined(OS_ANDROID) - if (command_line.HasSwitch(switches::kEnableSynchronousRendererCompositor)) { - // TODO(joth): Move above the |context| creation step above when the - // SynchronousCompositor no longer depends on externally created context. - return scoped_ptr<cc::OutputSurface>( - new SynchronousCompositorOutputSurface(routing_id(), - context)); - } -#endif - bool composite_to_mailbox = command_line.HasSwitch(cc::switches::kCompositeToMailbox); DCHECK(!composite_to_mailbox || command_line.HasSwitch( |