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

Unified Diff: content/public/test/test_synchronous_compositor_android.cc

Issue 2078383004: Add a BrowserViewRenderer unittest for compositor switch logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/public/test/test_synchronous_compositor_android.cc
diff --git a/content/public/test/test_synchronous_compositor_android.cc b/content/public/test/test_synchronous_compositor_android.cc
index 7f9bd2359b6402096882db250c11a7ae07065f0f..b47d28688ce127f3f567dfdc05c6f49e1cf55487 100644
--- a/content/public/test/test_synchronous_compositor_android.cc
+++ b/content/public/test/test_synchronous_compositor_android.cc
@@ -10,20 +10,19 @@
namespace content {
-TestSynchronousCompositor::TestSynchronousCompositor() : client_(NULL) {
-}
+TestSynchronousCompositor::TestSynchronousCompositor(int process_id,
+ int routing_id)
+ : client_(NULL), process_id_(process_id), routing_id_(routing_id) {}
TestSynchronousCompositor::~TestSynchronousCompositor() {
+ client_->DidDestroyCompositor(this, process_id_, routing_id_);
SetClient(NULL);
}
void TestSynchronousCompositor::SetClient(SynchronousCompositorClient* client) {
- if (client_)
- client_->DidDestroyCompositor(this, 0, 0);
client_ = client;
- if (client_) {
- client_->DidInitializeCompositor(this, 0, 0);
- }
+ if (client_)
+ client_->DidInitializeCompositor(this, process_id_, routing_id_);
boliu 2016/06/21 17:29:47 did you have to rearrange this logic?
hush (inactive) 2016/06/21 21:27:26 well it's saner. And... it is better to separate t
boliu 2016/06/21 21:31:59 Didn't SetClient(NULL) used to call DidDestroyComp
hush (inactive) 2016/06/21 22:02:27 ok. I reverted this bit.
}
SynchronousCompositor::Frame TestSynchronousCompositor::DemandDrawHw(

Powered by Google App Engine
This is Rietveld 408576698