| OLD | NEW |
| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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->SetAll(cc::RenderPassId(1, 1), gfx::Rect(viewport), clip, |
| 119 gfx::Transform(), false); | 119 gfx::Transform(), cc::FilterOperations(), |
| 120 cc::FilterOperations(), 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 Loading... |
| 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 |
| OLD | NEW |