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

Unified Diff: webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc

Issue 12330184: Use different client interface for WebLayerTreeViewForTesting to decouple from WebLayerTreeViewClie… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc b/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc
index dd1099b027520102898a724a1d95d1872dd540f3..62a83c79fcd0c7a6b5a7006434a95686b49dc91c 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc
@@ -33,11 +33,19 @@
#include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
namespace WebKit {
+WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting(
+ RenderingType type,
+ webkit_support::DRTLayerTreeViewClient* client)
+ : type_(type),
+ drt_client_(client),
+ client_(NULL) {}
WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting(
RenderingType type,
WebKit::WebLayerTreeViewClient* client)
- : type_(type), client_(client) {}
+ : type_(type),
+ drt_client_(NULL),
+ client_(client) {}
WebLayerTreeViewImplForTesting::~WebLayerTreeViewImplForTesting() {}
@@ -163,11 +171,11 @@ void WebLayerTreeViewImplForTesting::didBeginFrame() {}
void WebLayerTreeViewImplForTesting::animate(
double monotonic_frame_begin_time) {
- if (client_)
- client_->updateAnimations(monotonic_frame_begin_time);
}
void WebLayerTreeViewImplForTesting::layout() {
+ if (drt_client_)
+ drt_client_->Layout();
if (client_)
client_->layout();
}
@@ -221,6 +229,8 @@ void WebLayerTreeViewImplForTesting::didCommitAndDrawFrame() {}
void WebLayerTreeViewImplForTesting::didCompleteSwapBuffers() {}
void WebLayerTreeViewImplForTesting::scheduleComposite() {
+ if (drt_client_)
+ drt_client_->ScheduleComposite();
if (client_)
client_->scheduleComposite();
}
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.h ('k') | webkit/support/test_webkit_platform_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698