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/hardware_renderer.h" | 5 #include "android_webview/browser/hardware_renderer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "android_webview/browser/aw_gl_surface.h" | 9 #include "android_webview/browser/aw_gl_surface.h" |
10 #include "android_webview/browser/aw_render_thread_context_provider.h" | 10 #include "android_webview/browser/aw_render_thread_context_provider.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 } | 173 } |
174 | 174 |
175 void HardwareRenderer::SetBackingFrameBufferObject( | 175 void HardwareRenderer::SetBackingFrameBufferObject( |
176 int framebuffer_binding_ext) { | 176 int framebuffer_binding_ext) { |
177 surfaces_->SetBackingFrameBufferObject(framebuffer_binding_ext); | 177 surfaces_->SetBackingFrameBufferObject(framebuffer_binding_ext); |
178 } | 178 } |
179 | 179 |
180 void HardwareRenderer::ReturnResourcesInChildFrame() { | 180 void HardwareRenderer::ReturnResourcesInChildFrame() { |
181 if (child_frame_.get() && child_frame_->frame.get()) { | 181 if (child_frame_.get() && child_frame_->frame.get()) { |
182 cc::ReturnedResourceArray resources_to_return; | 182 cc::ReturnedResourceArray resources_to_return; |
183 DCHECK(child_frame_); | |
184 DCHECK(child_frame_->frame); | |
185 DCHECK(child_frame_->frame->delegated_frame_data); | |
boliu
2016/07/29 00:48:21
crash looks like this DCHECK is failing
the two D
ojars
2016/08/02 21:18:49
Done.
| |
186 // DCHECK(child_frame_->frame->delegated_frame_data->resource_list); | |
183 cc::TransferableResource::ReturnResources( | 187 cc::TransferableResource::ReturnResources( |
184 child_frame_->frame->delegated_frame_data->resource_list, | 188 child_frame_->frame->delegated_frame_data->resource_list, |
185 &resources_to_return); | 189 &resources_to_return); |
186 | 190 |
187 // The child frame's compositor id is not necessarily same as | 191 // The child frame's compositor id is not necessarily same as |
188 // compositor_id_. | 192 // compositor_id_. |
189 ReturnResourcesToCompositor(resources_to_return, | 193 ReturnResourcesToCompositor(resources_to_return, |
190 child_frame_->compositor_id, | 194 child_frame_->compositor_id, |
191 child_frame_->output_surface_id); | 195 child_frame_->output_surface_id); |
192 } | 196 } |
193 child_frame_.reset(); | 197 child_frame_.reset(); |
194 } | 198 } |
195 | 199 |
196 void HardwareRenderer::ReturnResourcesToCompositor( | 200 void HardwareRenderer::ReturnResourcesToCompositor( |
197 const cc::ReturnedResourceArray& resources, | 201 const cc::ReturnedResourceArray& resources, |
198 const CompositorID& compositor_id, | 202 const CompositorID& compositor_id, |
199 uint32_t output_surface_id) { | 203 uint32_t output_surface_id) { |
200 if (output_surface_id != last_committed_output_surface_id_) | 204 if (output_surface_id != last_committed_output_surface_id_) |
201 return; | 205 return; |
202 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id, | 206 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id, |
203 output_surface_id); | 207 output_surface_id); |
204 } | 208 } |
205 | 209 |
206 } // namespace android_webview | 210 } // namespace android_webview |
OLD | NEW |