| Index: android_webview/renderer/aw_render_view_ext.cc
|
| ===================================================================
|
| --- android_webview/renderer/aw_render_view_ext.cc (revision 182123)
|
| +++ android_webview/renderer/aw_render_view_ext.cc (working copy)
|
| @@ -15,7 +15,6 @@
|
| #include "content/public/renderer/android_content_detection_prefixes.h"
|
| #include "content/public/renderer/document_state.h"
|
| #include "content/public/renderer/render_view.h"
|
| -#include "skia/ext/refptr.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
|
| @@ -28,7 +27,6 @@
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
| -#include "third_party/skia/include/core/SkPicture.h"
|
|
|
| namespace android_webview {
|
|
|
| @@ -129,13 +127,18 @@
|
| AwRenderViewExt::AwRenderViewExt(content::RenderView* render_view)
|
| : content::RenderViewObserver(render_view) {
|
| render_view->GetWebView()->setPermissionClient(this);
|
| + // TODO(leandrogracia): enable once the feature is available in RenderView.
|
| // TODO(leandrogracia): remove when SW rendering uses Ubercompositor.
|
| // Until then we need the callback enabled for SW mode invalidation.
|
| // http://crbug.com/170086.
|
| - capture_picture_enabled_ = true;
|
| + //render_view->SetCapturePictureCallback(
|
| + // base::Bind(&AwRenderViewExt::OnPictureUpdate, AsWeakPtr()));
|
| }
|
|
|
| AwRenderViewExt::~AwRenderViewExt() {
|
| + // TODO(leandrogracia): enable once the feature is available in RenderView.
|
| + //render_view()->SetCapturePictureCallback(
|
| + // content::RenderView::CapturePictureCallback());
|
| RendererPictureMap::GetInstance()->ClearRendererPicture(routing_id());
|
| }
|
|
|
| @@ -226,15 +229,6 @@
|
| Send(new AwViewHostMsg_UpdateHitTestData(routing_id(), data));
|
| }
|
|
|
| -void AwRenderViewExt::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 AwRenderViewExt::OnDoHitTest(int view_x, int view_y) {
|
| if (!render_view() || !render_view()->GetWebView())
|
| return;
|
| @@ -257,12 +251,21 @@
|
| }
|
|
|
| void AwRenderViewExt::OnEnableCapturePictureCallback(bool enable) {
|
| - capture_picture_enabled_ = enable;
|
| + // TODO(leandrogracia): enable once the feature is available in RenderView.
|
| + //render_view()->SetCapturePictureCallback(enable ?
|
| + // base::Bind(&AwRenderViewExt::OnPictureUpdate, AsWeakPtr()) :
|
| + // content::RenderView::CapturePictureCallback());
|
| }
|
|
|
| +void AwRenderViewExt::OnPictureUpdate(skia::RefPtr<SkPicture> picture) {
|
| + RendererPictureMap::GetInstance()->SetRendererPicture(routing_id(), picture);
|
| + Send(new AwViewHostMsg_PictureUpdated(routing_id()));
|
| +}
|
| +
|
| void AwRenderViewExt::OnCapturePictureSync() {
|
| - RendererPictureMap::GetInstance()->SetRendererPicture(
|
| - routing_id(), render_view()->CapturePicture());
|
| + // TODO(leandrogracia): enable once the feature is available in RenderView.
|
| + //RendererPictureMap::GetInstance()->SetRendererPicture(
|
| + // routing_id(), render_view()->CapturePicture());
|
| }
|
|
|
| } // namespace android_webview
|
|
|