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

Unified Diff: android_webview/browser/hardware_renderer.cc

Issue 2036023002: Rewire Android WebView's compositor changed signal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: android_webview/browser/hardware_renderer.cc
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
index aee41918b23ba47b2a631e7bd718871de9cf28a0..5e690bb450c877d544051003cd9a90072ff58b11 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -38,7 +38,6 @@ HardwareRenderer::HardwareRenderer(RenderThreadManager* state)
: render_thread_manager_(state),
last_egl_context_(eglGetCurrentContext()),
gl_surface_(new AwGLSurface),
- compositor_id_(0u), // Valid compositor id starts at 1.
last_committed_output_surface_id_(0u),
last_submitted_output_surface_id_(0u),
output_surface_(NULL) {
@@ -114,7 +113,8 @@ void HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info,
// kModeProcess. Instead, submit the frame in "kModeDraw" stage to avoid
// unnecessary kModeProcess.
if (child_frame_.get() && child_frame_->frame.get()) {
- if (compositor_id_ != child_frame_->compositor_id ||
+ if (CompositorIDIsDifferent()(compositor_id_,
+ child_frame_->compositor_id) ||
last_submitted_output_surface_id_ != child_frame_->output_surface_id) {
if (!root_id_.is_null())
surface_factory_->Destroy(root_id_);
@@ -261,7 +261,7 @@ void HardwareRenderer::ReturnResourcesInChildFrame() {
void HardwareRenderer::ReturnResourcesToCompositor(
const cc::ReturnedResourceArray& resources,
- uint32_t compositor_id,
+ CompositorID compositor_id,
uint32_t output_surface_id) {
if (output_surface_id != last_committed_output_surface_id_)
return;

Powered by Google App Engine
This is Rietveld 408576698