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

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

Issue 2374183006: Remove GLFrameData from CompositorFrame. (Closed)
Patch Set: Rebase. Created 4 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
« no previous file with comments | « no previous file | android_webview/browser/parent_output_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 std::unique_ptr<ChildFrame> child_frame = 60 std::unique_ptr<ChildFrame> child_frame =
61 render_thread_manager_->PassFrameOnRT(); 61 render_thread_manager_->PassFrameOnRT();
62 if (!child_frame.get()) 62 if (!child_frame.get())
63 return; 63 return;
64 64
65 last_committed_compositor_frame_sink_id_ = 65 last_committed_compositor_frame_sink_id_ =
66 child_frame->compositor_frame_sink_id; 66 child_frame->compositor_frame_sink_id;
67 ReturnResourcesInChildFrame(); 67 ReturnResourcesInChildFrame();
68 child_frame_ = std::move(child_frame); 68 child_frame_ = std::move(child_frame);
69 DCHECK(child_frame_->frame.get()); 69 DCHECK(child_frame_->frame.get());
70 DCHECK(!child_frame_->frame->gl_frame_data);
71 } 70 }
72 71
73 void HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info) { 72 void HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info) {
74 TRACE_EVENT0("android_webview", "HardwareRenderer::DrawGL"); 73 TRACE_EVENT0("android_webview", "HardwareRenderer::DrawGL");
75 74
76 // We need to watch if the current Android context has changed and enforce 75 // We need to watch if the current Android context has changed and enforce
77 // a clean-up in the compositor. 76 // a clean-up in the compositor.
78 EGLContext current_context = eglGetCurrentContext(); 77 EGLContext current_context = eglGetCurrentContext();
79 DCHECK(current_context) << "DrawGL called without EGLContext"; 78 DCHECK(current_context) << "DrawGL called without EGLContext";
80 79
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 const cc::ReturnedResourceArray& resources, 192 const cc::ReturnedResourceArray& resources,
194 const CompositorID& compositor_id, 193 const CompositorID& compositor_id,
195 uint32_t compositor_frame_sink_id) { 194 uint32_t compositor_frame_sink_id) {
196 if (compositor_frame_sink_id != last_committed_compositor_frame_sink_id_) 195 if (compositor_frame_sink_id != last_committed_compositor_frame_sink_id_)
197 return; 196 return;
198 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id, 197 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id,
199 compositor_frame_sink_id); 198 compositor_frame_sink_id);
200 } 199 }
201 200
202 } // namespace android_webview 201 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/parent_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698