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

Unified Diff: android_webview/renderer/view_renderer.cc

Issue 16796002: Delete the browser-compositor webview render mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
« no previous file with comments | « android_webview/renderer/view_renderer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/renderer/view_renderer.cc
diff --git a/android_webview/renderer/view_renderer.cc b/android_webview/renderer/view_renderer.cc
deleted file mode 100644
index d44ea12e5f597724ca336dd03639b1adc8b06365..0000000000000000000000000000000000000000
--- a/android_webview/renderer/view_renderer.cc
+++ /dev/null
@@ -1,66 +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 "android_webview/renderer/view_renderer.h"
-
-#include "android_webview/common/aw_switches.h"
-#include "android_webview/common/render_view_messages.h"
-#include "android_webview/common/renderer_picture_map.h"
-#include "base/command_line.h"
-#include "content/public/renderer/render_view.h"
-#include "skia/ext/refptr.h"
-
-namespace android_webview {
-
-// static
-void ViewRenderer::RenderViewCreated(content::RenderView* render_view) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kNoMergeUIAndRendererCompositorThreads)) {
- new ViewRenderer(render_view); // |render_view| takes ownership.
- }
-}
-
-ViewRenderer::ViewRenderer(content::RenderView* render_view)
- : content::RenderViewObserver(render_view),
- // TODO(leandrogracia): default to false when SW mode uses Ubercompositor.
- // Until then we need picture updates enabled for SW mode invalidation.
- // http://crbug.com/170086.
- capture_picture_enabled_(true) {
-}
-
-ViewRenderer::~ViewRenderer() {
- RendererPictureMap::GetInstance()->ClearRendererPicture(routing_id());
-}
-
-bool ViewRenderer::OnMessageReceived(const IPC::Message& message) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(ViewRenderer, message)
- IPC_MESSAGE_HANDLER(AwViewMsg_EnableCapturePictureCallback,
- OnEnableCapturePictureCallback)
- IPC_MESSAGE_HANDLER(AwViewMsg_CapturePictureSync,
- OnCapturePictureSync)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
-void ViewRenderer::DidCommitCompositorFrame() {
- if (!capture_picture_enabled_)
- return;
-
- skia::RefPtr<SkPicture> picture = render_view()->CapturePicture();
- RendererPictureMap::GetInstance()->SetRendererPicture(routing_id(), picture);
- Send(new AwViewHostMsg_PictureUpdated(routing_id()));
-}
-
-void ViewRenderer::OnEnableCapturePictureCallback(bool enable) {
- capture_picture_enabled_ = enable;
-}
-
-void ViewRenderer::OnCapturePictureSync() {
- RendererPictureMap::GetInstance()->SetRendererPicture(
- routing_id(), render_view()->CapturePicture());
-}
-
-} // namespace android_webview
« no previous file with comments | « android_webview/renderer/view_renderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698