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

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

Issue 2543473004: cc: Move filters from RenderPassDrawQuad to RenderPass (Closed)
Patch Set: Rebase again 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') | no next file with comments »
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 const gfx::Rect& clip, 105 const gfx::Rect& clip,
106 const gfx::Transform& transform, 106 const gfx::Transform& transform,
107 const gfx::Size& frame_size, 107 const gfx::Size& frame_size,
108 const cc::SurfaceId& child_id) { 108 const cc::SurfaceId& child_id) {
109 DCHECK(std::find(child_ids_.begin(), child_ids_.end(), child_id) != 109 DCHECK(std::find(child_ids_.begin(), child_ids_.end(), child_id) !=
110 child_ids_.end()); 110 child_ids_.end());
111 111
112 // Create a frame with a single SurfaceDrawQuad referencing the child 112 // Create a frame with a single SurfaceDrawQuad referencing the child
113 // Surface and transformed using the given transform. 113 // Surface and transformed using the given transform.
114 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); 114 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
115 render_pass->SetAll(1, gfx::Rect(viewport), clip, gfx::Transform(), false); 115 render_pass->SetNew(1, gfx::Rect(viewport), clip, gfx::Transform());
116 render_pass->has_transparent_background = false;
116 117
117 cc::SharedQuadState* quad_state = 118 cc::SharedQuadState* quad_state =
118 render_pass->CreateAndAppendSharedQuadState(); 119 render_pass->CreateAndAppendSharedQuadState();
119 quad_state->quad_to_target_transform = transform; 120 quad_state->quad_to_target_transform = transform;
120 quad_state->quad_layer_bounds = frame_size; 121 quad_state->quad_layer_bounds = frame_size;
121 quad_state->visible_quad_layer_rect = gfx::Rect(frame_size); 122 quad_state->visible_quad_layer_rect = gfx::Rect(frame_size);
122 quad_state->clip_rect = clip; 123 quad_state->clip_rect = clip;
123 quad_state->is_clipped = true; 124 quad_state->is_clipped = true;
124 quad_state->opacity = 1.f; 125 quad_state->opacity = 1.f;
125 126
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 CHECK(resources.empty()); 173 CHECK(resources.empty());
173 } 174 }
174 175
175 void SurfacesInstance::SetBeginFrameSource( 176 void SurfacesInstance::SetBeginFrameSource(
176 cc::BeginFrameSource* begin_frame_source) { 177 cc::BeginFrameSource* begin_frame_source) {
177 // Parent compsitor calls DrawAndSwap directly and doesn't use 178 // Parent compsitor calls DrawAndSwap directly and doesn't use
178 // BeginFrameSource. 179 // BeginFrameSource.
179 } 180 }
180 181
181 } // namespace android_webview 182 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | cc/ipc/cc_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698