Chromium Code Reviews| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 content::SynchronousCompositor::Frame frame = | 237 content::SynchronousCompositor::Frame frame = |
| 238 compositor_->DemandDrawHw(surface_size, | 238 compositor_->DemandDrawHw(surface_size, |
| 239 gfx::Transform(), | 239 gfx::Transform(), |
| 240 viewport, | 240 viewport, |
| 241 clip, | 241 clip, |
| 242 viewport_rect_for_tile_priority, | 242 viewport_rect_for_tile_priority, |
| 243 transform_for_tile_priority); | 243 transform_for_tile_priority); |
| 244 if (!frame.frame.get()) { | 244 if (!frame.frame.get()) { |
| 245 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame", | 245 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame", |
| 246 TRACE_EVENT_SCOPE_THREAD); | 246 TRACE_EVENT_SCOPE_THREAD); |
| 247 hardware_enabled_ = compositor_frame_consumer_->HasFrameOnUI(); | 247 hardware_enabled_ = compositor_frame_consumer_->HasFrameOnUI(); |
|
hush (inactive)
2016/05/14 00:33:14
just return compositor_frame_consumer_->HasFrameOn
| |
| 248 if (!hardware_enabled_) | |
| 249 UpdateMemoryPolicy(); | |
| 250 return hardware_enabled_; | 248 return hardware_enabled_; |
| 251 } | 249 } |
| 252 | 250 |
| 253 std::unique_ptr<ChildFrame> child_frame = base::WrapUnique(new ChildFrame( | 251 std::unique_ptr<ChildFrame> child_frame = base::WrapUnique(new ChildFrame( |
| 254 frame.output_surface_id, std::move(frame.frame), | 252 frame.output_surface_id, std::move(frame.frame), |
| 255 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(), | 253 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(), |
| 256 transform_for_tile_priority, offscreen_pre_raster_, | 254 transform_for_tile_priority, offscreen_pre_raster_, |
| 257 external_draw_constraints_.is_layer)); | 255 external_draw_constraints_.is_layer)); |
| 258 | 256 |
| 259 ReturnUnusedResource(compositor_frame_consumer_->PassUncommittedFrameOnUI()); | 257 ReturnUnusedResource(compositor_frame_consumer_->PassUncommittedFrameOnUI()); |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 720 base::StringAppendF(&str, | 718 base::StringAppendF(&str, |
| 721 "overscroll_rounding_error_: %s ", | 719 "overscroll_rounding_error_: %s ", |
| 722 overscroll_rounding_error_.ToString().c_str()); | 720 overscroll_rounding_error_.ToString().c_str()); |
| 723 base::StringAppendF( | 721 base::StringAppendF( |
| 724 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); | 722 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); |
| 725 base::StringAppendF(&str, "clear_view: %d ", clear_view_); | 723 base::StringAppendF(&str, "clear_view: %d ", clear_view_); |
| 726 return str; | 724 return str; |
| 727 } | 725 } |
| 728 | 726 |
| 729 } // namespace android_webview | 727 } // namespace android_webview |
| OLD | NEW |