| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/browser_view_renderer_client.h" | 9 #include "android_webview/browser/browser_view_renderer_client.h" |
| 10 #include "android_webview/browser/child_frame.h" | 10 #include "android_webview/browser/child_frame.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 content::SynchronousCompositor::Frame frame = | 253 content::SynchronousCompositor::Frame frame = |
| 254 compositor_->DemandDrawHw(surface_size, | 254 compositor_->DemandDrawHw(surface_size, |
| 255 gfx::Transform(), | 255 gfx::Transform(), |
| 256 viewport, | 256 viewport, |
| 257 clip, | 257 clip, |
| 258 viewport_rect_for_tile_priority, | 258 viewport_rect_for_tile_priority, |
| 259 transform_for_tile_priority); | 259 transform_for_tile_priority); |
| 260 if (!frame.frame.get()) { | 260 if (!frame.frame.get()) { |
| 261 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame", | 261 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame", |
| 262 TRACE_EVENT_SCOPE_THREAD); | 262 TRACE_EVENT_SCOPE_THREAD); |
| 263 return shared_renderer_state_.HasFrameOnUI(); | 263 hardware_enabled_ = shared_renderer_state_.HasFrameOnUI(); |
| 264 if (!hardware_enabled_) |
| 265 UpdateMemoryPolicy(); |
| 266 return hardware_enabled_; |
| 264 } | 267 } |
| 265 | 268 |
| 266 scoped_ptr<ChildFrame> child_frame = make_scoped_ptr(new ChildFrame( | 269 scoped_ptr<ChildFrame> child_frame = make_scoped_ptr(new ChildFrame( |
| 267 frame.output_surface_id, std::move(frame.frame), | 270 frame.output_surface_id, std::move(frame.frame), |
| 268 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(), | 271 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(), |
| 269 transform_for_tile_priority, offscreen_pre_raster_, | 272 transform_for_tile_priority, offscreen_pre_raster_, |
| 270 parent_draw_constraints.is_layer)); | 273 parent_draw_constraints.is_layer)); |
| 271 | 274 |
| 272 ReturnUnusedResource(shared_renderer_state_.PassUncommittedFrameOnUI()); | 275 ReturnUnusedResource(shared_renderer_state_.PassUncommittedFrameOnUI()); |
| 273 shared_renderer_state_.SetCompositorFrameOnUI(std::move(child_frame)); | 276 shared_renderer_state_.SetCompositorFrameOnUI(std::move(child_frame)); |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 base::StringAppendF(&str, | 729 base::StringAppendF(&str, |
| 727 "overscroll_rounding_error_: %s ", | 730 "overscroll_rounding_error_: %s ", |
| 728 overscroll_rounding_error_.ToString().c_str()); | 731 overscroll_rounding_error_.ToString().c_str()); |
| 729 base::StringAppendF( | 732 base::StringAppendF( |
| 730 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 733 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 731 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 734 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 732 return str; | 735 return str; |
| 733 } | 736 } |
| 734 | 737 |
| 735 } // namespace android_webview | 738 } // namespace android_webview |
| OLD | NEW |