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

Side by Side Diff: android_webview/browser/hardware_renderer.cc

Issue 599633004: Android WebView: fix missing an invalidate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/hardware_renderer.h" 5 #include "android_webview/browser/hardware_renderer.h"
6 6
7 #include "android_webview/browser/aw_gl_surface.h" 7 #include "android_webview/browser/aw_gl_surface.h"
8 #include "android_webview/browser/deferred_gpu_command_service.h" 8 #include "android_webview/browser/deferred_gpu_command_service.h"
9 #include "android_webview/browser/parent_output_surface.h" 9 #include "android_webview/browser/parent_output_surface.h"
10 #include "android_webview/browser/shared_renderer_state.h" 10 #include "android_webview/browser/shared_renderer_state.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 gfx::Transform transform(gfx::Transform::kSkipInitialization); 195 gfx::Transform transform(gfx::Transform::kSkipInitialization);
196 transform.matrix().setColMajorf(draw_info->transform); 196 transform.matrix().setColMajorf(draw_info->transform);
197 transform.Translate(scroll_offset_.x(), scroll_offset_.y()); 197 transform.Translate(scroll_offset_.x(), scroll_offset_.y());
198 198
199 // Need to post the new transform matrix back to child compositor 199 // Need to post the new transform matrix back to child compositor
200 // because there is no onDraw during a Render Thread animation, and child 200 // because there is no onDraw during a Render Thread animation, and child
201 // compositor might not have the tiles rasterized as the animation goes on. 201 // compositor might not have the tiles rasterized as the animation goes on.
202 ParentCompositorDrawConstraints draw_constraints( 202 ParentCompositorDrawConstraints draw_constraints(
203 draw_info->is_layer, transform, gfx::Rect(viewport_)); 203 draw_info->is_layer, transform, gfx::Rect(viewport_));
204 if (!draw_constraints_.Equals(draw_constraints)) { 204
205 draw_constraints_ = draw_constraints; 205 draw_constraints_ = draw_constraints;
206 shared_renderer_state_->PostExternalDrawConstraintsToChildCompositor( 206 shared_renderer_state_->PostExternalDrawConstraintsToChildCompositor(
207 draw_constraints); 207 draw_constraints);
208 }
209 208
210 if (!delegated_layer_.get()) 209 if (!delegated_layer_.get())
211 return; 210 return;
212 211
213 viewport_.SetSize(draw_info->width, draw_info->height); 212 viewport_.SetSize(draw_info->width, draw_info->height);
214 layer_tree_host_->SetViewportSize(viewport_); 213 layer_tree_host_->SetViewportSize(viewport_);
215 clip_.SetRect(draw_info->clip_left, 214 clip_.SetRect(draw_info->clip_left,
216 draw_info->clip_top, 215 draw_info->clip_top,
217 draw_info->clip_right - draw_info->clip_left, 216 draw_info->clip_right - draw_info->clip_left,
218 draw_info->clip_bottom - draw_info->clip_top); 217 draw_info->clip_bottom - draw_info->clip_top);
(...skipping 26 matching lines...) Expand all
245 } 244 }
246 245
247 void HardwareRenderer::UnusedResourcesAreAvailable() { 246 void HardwareRenderer::UnusedResourcesAreAvailable() {
248 cc::ReturnedResourceArray returned_resources; 247 cc::ReturnedResourceArray returned_resources;
249 resource_collection_->TakeUnusedResourcesForChildCompositor( 248 resource_collection_->TakeUnusedResourcesForChildCompositor(
250 &returned_resources); 249 &returned_resources);
251 shared_renderer_state_->InsertReturnedResources(returned_resources); 250 shared_renderer_state_->InsertReturnedResources(returned_resources);
252 } 251 }
253 252
254 } // namespace android_webview 253 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer.cc ('k') | android_webview/browser/shared_renderer_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698