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

Side by Side Diff: content/browser/compositor/mus_browser_compositor_output_surface.cc

Issue 2543473004: cc: Move filters from RenderPassDrawQuad to RenderPass (Closed)
Patch Set: 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
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 "content/browser/compositor/mus_browser_compositor_output_surface.h" 5 #include "content/browser/compositor/mus_browser_compositor_output_surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/output_surface_frame.h" 10 #include "cc/output/output_surface_frame.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const gfx::Rect bounds = ui_window_ ? gfx::Rect(ui_window_->bounds().size()) 69 const gfx::Rect bounds = ui_window_ ? gfx::Rect(ui_window_->bounds().size())
70 : gfx::Rect(window_->bounds().size()); 70 : gfx::Rect(window_->bounds().size());
71 cc::CompositorFrame ui_frame; 71 cc::CompositorFrame ui_frame;
72 ui_frame.metadata.latency_info = std::move(frame.latency_info); 72 ui_frame.metadata.latency_info = std::move(frame.latency_info);
73 // Reset latency_info to known empty state after moving contents. 73 // Reset latency_info to known empty state after moving contents.
74 frame.latency_info.clear(); 74 frame.latency_info.clear();
75 const cc::RenderPassId render_pass_id(1, 1); 75 const cc::RenderPassId render_pass_id(1, 1);
76 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 76 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
77 const bool has_transparent_background = true; 77 const bool has_transparent_background = true;
78 pass->SetAll(render_pass_id, bounds, bounds, gfx::Transform(), 78 pass->SetAll(render_pass_id, bounds, bounds, gfx::Transform(),
79 cc::FilterOperations(), cc::FilterOperations(),
79 has_transparent_background); 80 has_transparent_background);
80 // The SharedQuadState is owned by the SharedQuadStateList 81 // The SharedQuadState is owned by the SharedQuadStateList
81 // shared_quad_state_list. 82 // shared_quad_state_list.
82 cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState(); 83 cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
83 sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds, 84 sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds,
84 false /* is_clipped */, 1.f /* opacity */, SkBlendMode::kSrc, 85 false /* is_clipped */, 1.f /* opacity */, SkBlendMode::kSrc,
85 0 /* sorting_context_id */); 86 0 /* sorting_context_id */);
86 87
87 cc::TransferableResource resource; 88 cc::TransferableResource resource;
88 resource.id = AllocateResourceId(); 89 resource.id = AllocateResourceId();
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 201
201 const gpu::Mailbox& MusBrowserCompositorOutputSurface::GetMailboxFromResourceId( 202 const gpu::Mailbox& MusBrowserCompositorOutputSurface::GetMailboxFromResourceId(
202 uint32_t id) { 203 uint32_t id) {
203 DCHECK_LT(id, mailboxes_.size()); 204 DCHECK_LT(id, mailboxes_.size());
204 DCHECK(std::find(free_resource_ids_.begin(), free_resource_ids_.end(), id) == 205 DCHECK(std::find(free_resource_ids_.begin(), free_resource_ids_.end(), id) ==
205 free_resource_ids_.end()); 206 free_resource_ids_.end());
206 return mailboxes_[id]; 207 return mailboxes_[id];
207 } 208 }
208 209
209 } // namespace content 210 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698