| OLD | NEW |
| 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/browser_view_renderer.h" | 5 #include "android_webview/browser/browser_view_renderer.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/browser_view_renderer_client.h" | 7 #include "android_webview/browser/browser_view_renderer_client.h" |
| 8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 viewport_rect_for_tile_priority = last_on_draw_global_visible_rect_; | 229 viewport_rect_for_tile_priority = last_on_draw_global_visible_rect_; |
| 230 } | 230 } |
| 231 | 231 |
| 232 scoped_ptr<cc::CompositorFrame> frame = | 232 scoped_ptr<cc::CompositorFrame> frame = |
| 233 compositor_->DemandDrawHw(surface_size, | 233 compositor_->DemandDrawHw(surface_size, |
| 234 gfx::Transform(), | 234 gfx::Transform(), |
| 235 viewport, | 235 viewport, |
| 236 clip, | 236 clip, |
| 237 viewport_rect_for_tile_priority, | 237 viewport_rect_for_tile_priority, |
| 238 transform_for_tile_priority); | 238 transform_for_tile_priority); |
| 239 if (frame.get()) | 239 DidComposite(); |
| 240 DidComposite(); | |
| 241 return frame.Pass(); | 240 return frame.Pass(); |
| 242 } | 241 } |
| 243 | 242 |
| 244 void BrowserViewRenderer::UpdateParentDrawConstraints() { | 243 void BrowserViewRenderer::UpdateParentDrawConstraints() { |
| 245 // Post an invalidate if the parent draw constraints are stale and there is | 244 // Post an invalidate if the parent draw constraints are stale and there is |
| 246 // no pending invalidate. | 245 // no pending invalidate. |
| 247 bool needs_force_invalidate = | 246 bool needs_force_invalidate = |
| 248 shared_renderer_state_.NeedsForceInvalidateOnNextDrawGLOnUI(); | 247 shared_renderer_state_.NeedsForceInvalidateOnNextDrawGLOnUI(); |
| 249 if (needs_force_invalidate || | 248 if (needs_force_invalidate || |
| 250 !parent_draw_constraints_.Equals( | 249 !parent_draw_constraints_.Equals( |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 base::StringAppendF(&str, | 745 base::StringAppendF(&str, |
| 747 "overscroll_rounding_error_: %s ", | 746 "overscroll_rounding_error_: %s ", |
| 748 overscroll_rounding_error_.ToString().c_str()); | 747 overscroll_rounding_error_.ToString().c_str()); |
| 749 base::StringAppendF( | 748 base::StringAppendF( |
| 750 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 749 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 751 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 750 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 752 return str; | 751 return str; |
| 753 } | 752 } |
| 754 | 753 |
| 755 } // namespace android_webview | 754 } // namespace android_webview |
| OLD | NEW |