diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/content_common.gypi | 2 | ||||
-rw-r--r-- | content/content_renderer.gypi | 2 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 5 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 1 | ||||
-rw-r--r-- | content/public/renderer/android/OWNERS | 6 | ||||
-rw-r--r-- | content/public/renderer/android/synchronous_compositor.h | 35 | ||||
-rw-r--r-- | content/public/renderer/android/synchronous_compositor_client.h | 28 | ||||
-rw-r--r-- | content/public/renderer/content_renderer_client.h | 9 | ||||
-rw-r--r-- | content/renderer/android/synchronous_compositor_output_surface.cc | 69 | ||||
-rw-r--r-- | content/renderer/android/synchronous_compositor_output_surface.h | 56 | ||||
-rw-r--r-- | content/renderer/render_widget.cc | 14 |
11 files changed, 0 insertions, 227 deletions
diff --git a/content/content_common.gypi b/content/content_common.gypi index 57b47ba..e0558e9 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -22,8 +22,6 @@ '../base/base.gyp:base', ], 'sources': [ - 'public/common/android/synchronous_compositor_client.h', - 'public/common/android/synchronous_compositor.h', 'public/common/bindings_policy.h', 'public/common/child_process_host.h', 'public/common/child_process_host_delegate.cc', diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 20acfb7..ec70560 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -66,8 +66,6 @@ 'renderer/android/email_detector.h', 'renderer/android/phone_number_detector.cc', 'renderer/android/phone_number_detector.h', - 'renderer/android/synchronous_compositor_output_surface.cc', - 'renderer/android/synchronous_compositor_output_surface.h', 'renderer/device_orientation_dispatcher.cc', 'renderer/device_orientation_dispatcher.h', 'renderer/devtools/devtools_agent.cc', diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 208e4e1..8929515 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -437,11 +437,6 @@ const char kForceCompositingMode[] = "force-compositing-mode"; // via field trials. const char kDisableForceCompositingMode[] = "disable-force-compositing-mode"; -// Enable the synchronous renderer compositor API. See -// ContentRendererClient::DidCreateSynchronousCompositor() -const char kEnableSynchronousRendererCompositor[] = - "enable-synchronous-renderer-compositor"; - // Some field trials may be randomized in the browser, and the randomly selected // outcome needs to be propagated to the renderer. For instance, this is used // to modify histograms recorded in the renderer, or to get the renderer to diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index fd750b7..4692f9e 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -130,7 +130,6 @@ CONTENT_EXPORT extern const char kEnableSoftwareCompositingGLAdapter[]; CONTENT_EXPORT extern const char kEnableSmoothScrolling[]; CONTENT_EXPORT extern const char kEnableStatsTable[]; extern const char kEnableStrictSiteIsolation[]; -extern const char kEnableSynchronousRendererCompositor[]; CONTENT_EXPORT extern const char kEnableThreadedCompositing[]; CONTENT_EXPORT extern const char kDisableThreadedCompositing[]; extern const char kEnableVirtualGLContexts[]; diff --git a/content/public/renderer/android/OWNERS b/content/public/renderer/android/OWNERS deleted file mode 100644 index cff1ac9..0000000 --- a/content/public/renderer/android/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -# While the SynchronousCompositor API is in active development include -# all the following owners in any changes under this path. - -jamesr@chromium.org -joth@chromium.org -mkosiba@chromium.org diff --git a/content/public/renderer/android/synchronous_compositor.h b/content/public/renderer/android/synchronous_compositor.h deleted file mode 100644 index f0c380d..0000000 --- a/content/public/renderer/android/synchronous_compositor.h +++ /dev/null @@ -1,35 +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_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSTIOR_ -#define CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_ - -class SkCanvas; - -namespace content { - -class SynchronousCompositorClient; - -// Interface for embedders that which to direct compositing operations -// synchronously under their own control. Only meaningful when the -// kEnableSyncrhonousRendererCompositor flag is specified. -class SynchronousCompositor { - public: - // Allows changing or resetting the client to NULL (this must be used if - // the client is being deleted prior to the DidDestroyCompositor() call - // being received by the client). Ownership of |client| remains with - // the caller. - virtual void SetClient(SynchronousCompositorClient* client) = 0; - - // "On demand" SW draw, into the supplied canvas (observing the transform - // and clip set there-in). - virtual bool DemandDrawSw(SkCanvas* canvas) = 0; - - protected: - virtual ~SynchronousCompositor() {} -}; - -} // namespace content - -#endif // CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSTIOR_ diff --git a/content/public/renderer/android/synchronous_compositor_client.h b/content/public/renderer/android/synchronous_compositor_client.h deleted file mode 100644 index dcbe09a..0000000 --- a/content/public/renderer/android/synchronous_compositor_client.h +++ /dev/null @@ -1,28 +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_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSTIOR_CLIENT_H_ -#define CONTENT_PUBLIC_RENDERER_ANDROID_SYNCRHONOUS_COMPOSITOR_CLIENT_H_ - -namespace content { - -class SynchronousCompositor; - -class SynchronousCompositorClient { - public: - // Indication to the client that |compositor| is going out of scope, and - // must not be accessed within or after this call. - // NOTE if the client goes away before the compositor it must call - // SynchronousCompositor::SetClient(NULL) to release the back pointer. - virtual void DidDestroyCompositor(SynchronousCompositor* compositor) = 0; - - // TODO(joth): Add scroll getters and setters, and invalidations. - - protected: - virtual ~SynchronousCompositorClient() {} -}; - -} // namespace content - -#endif // CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSTIOR_CLIENT_H_ diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h index 84b6d58..653d38c 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -59,7 +59,6 @@ class WebMediaPlayerParams; namespace content { class RenderView; -class SynchronousCompositor; // Embedder API for participating in renderer logic. class CONTENT_EXPORT ContentRendererClient { @@ -235,14 +234,6 @@ class CONTENT_EXPORT ContentRendererClient { // RenderThreadImpl. If NULL, then a new thread will be created. virtual base::MessageLoop* OverrideCompositorMessageLoop() const; - // Called when a render view's compositor instance is created, when the - // kEnableSynchronousRendererCompositor flag is used. - // NOTE this is called on the Compositor thread: the embedder must - // implement OverrideCompositorMessageLoop() when using this interface. - virtual void DidCreateSynchronousCompositor( - int render_view_id, - SynchronousCompositor* compositor) {} - // Allow the embedder to disable input event filtering by the compositor. virtual bool ShouldCreateCompositorInputHandler() const; }; 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( |