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

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

Issue 2543473004: cc: Move filters from RenderPassDrawQuad to RenderPass (Closed)
Patch Set: Address review comments Created 4 years 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 | cc/ipc/cc_param_traits.cc » ('j') | cc/ipc/cc_param_traits.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/surfaces_instance.h" 5 #include "android_webview/browser/surfaces_instance.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "android_webview/browser/aw_gl_surface.h" 10 #include "android_webview/browser/aw_gl_surface.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const gfx::Rect& clip, 108 const gfx::Rect& clip,
109 const gfx::Transform& transform, 109 const gfx::Transform& transform,
110 const gfx::Size& frame_size, 110 const gfx::Size& frame_size,
111 const cc::SurfaceId& child_id) { 111 const cc::SurfaceId& child_id) {
112 DCHECK(std::find(child_ids_.begin(), child_ids_.end(), child_id) != 112 DCHECK(std::find(child_ids_.begin(), child_ids_.end(), child_id) !=
113 child_ids_.end()); 113 child_ids_.end());
114 114
115 // Create a frame with a single SurfaceDrawQuad referencing the child 115 // Create a frame with a single SurfaceDrawQuad referencing the child
116 // Surface and transformed using the given transform. 116 // Surface and transformed using the given transform.
117 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); 117 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
118 render_pass->SetAll(cc::RenderPassId(1, 1), gfx::Rect(viewport), clip, 118 render_pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(viewport), clip,
119 gfx::Transform(), false); 119 gfx::Transform());
120 render_pass->has_transparent_background = false;
120 121
121 cc::SharedQuadState* quad_state = 122 cc::SharedQuadState* quad_state =
122 render_pass->CreateAndAppendSharedQuadState(); 123 render_pass->CreateAndAppendSharedQuadState();
123 quad_state->quad_to_target_transform = transform; 124 quad_state->quad_to_target_transform = transform;
124 quad_state->quad_layer_bounds = frame_size; 125 quad_state->quad_layer_bounds = frame_size;
125 quad_state->visible_quad_layer_rect = gfx::Rect(frame_size); 126 quad_state->visible_quad_layer_rect = gfx::Rect(frame_size);
126 quad_state->clip_rect = clip; 127 quad_state->clip_rect = clip;
127 quad_state->is_clipped = true; 128 quad_state->is_clipped = true;
128 quad_state->opacity = 1.f; 129 quad_state->opacity = 1.f;
129 130
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 CHECK(resources.empty()); 178 CHECK(resources.empty());
178 } 179 }
179 180
180 void SurfacesInstance::SetBeginFrameSource( 181 void SurfacesInstance::SetBeginFrameSource(
181 cc::BeginFrameSource* begin_frame_source) { 182 cc::BeginFrameSource* begin_frame_source) {
182 // Parent compsitor calls DrawAndSwap directly and doesn't use 183 // Parent compsitor calls DrawAndSwap directly and doesn't use
183 // BeginFrameSource. 184 // BeginFrameSource.
184 } 185 }
185 186
186 } // namespace android_webview 187 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | cc/ipc/cc_param_traits.cc » ('j') | cc/ipc/cc_param_traits.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698