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

Side by Side Diff: services/ui/demo/bitmap_uploader.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/demo/bitmap_uploader.h" 5 #include "services/ui/demo/bitmap_uploader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const gfx::Rect bounds(window_->bounds().size()); 77 const gfx::Rect bounds(window_->bounds().size());
78 78
79 cc::CompositorFrame frame; 79 cc::CompositorFrame frame;
80 // TODO(rjkroege): Support device scale factors other than 1. 80 // TODO(rjkroege): Support device scale factors other than 1.
81 frame.metadata.device_scale_factor = 1.0f; 81 frame.metadata.device_scale_factor = 1.0f;
82 frame.resource_list.resize(0u); 82 frame.resource_list.resize(0u);
83 83
84 const cc::RenderPassId render_pass_id(1, 1); 84 const cc::RenderPassId render_pass_id(1, 1);
85 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 85 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
86 pass->SetAll(render_pass_id, bounds, bounds, gfx::Transform(), 86 pass->SetAll(render_pass_id, bounds, bounds, gfx::Transform(),
87 cc::FilterOperations(), cc::FilterOperations(),
danakj 2016/12/01 01:50:46 This should use SetNew for that reason. It can set
ajuma 2016/12/13 15:08:12 Done.
87 true /* has_transparent_background */); 88 true /* has_transparent_background */);
88 89
89 // The SharedQuadState is owned by the SharedQuadStateList 90 // The SharedQuadState is owned by the SharedQuadStateList
90 // shared_quad_state_list. 91 // shared_quad_state_list.
91 cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState(); 92 cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
92 sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds, 93 sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds,
93 false /* is_clipped */, 1.f /* opacity */, SkBlendMode::kSrc, 94 false /* is_clipped */, 1.f /* opacity */, SkBlendMode::kSrc,
94 0 /* sorting_context_id */); 95 0 /* sorting_context_id */);
95 96
96 if (bitmap_.get()) { 97 if (bitmap_.get()) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // TODO(fsamuel): Implement this. 235 // TODO(fsamuel): Implement this.
235 } 236 }
236 237
237 void BitmapUploader::SetExternalTilePriorityConstraints( 238 void BitmapUploader::SetExternalTilePriorityConstraints(
238 const gfx::Rect& viewport_rect, 239 const gfx::Rect& viewport_rect,
239 const gfx::Transform& transform) { 240 const gfx::Transform& transform) {
240 // TODO(fsamuel): Implement this. 241 // TODO(fsamuel): Implement this.
241 } 242 }
242 243
243 } // namespace ui 244 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698