OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
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->SetNew(render_pass_id, bounds, bounds, gfx::Transform()); |
87 true /* has_transparent_background */); | |
88 | 87 |
89 // The SharedQuadState is owned by the SharedQuadStateList | 88 // The SharedQuadState is owned by the SharedQuadStateList |
90 // shared_quad_state_list. | 89 // shared_quad_state_list. |
91 cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState(); | 90 cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState(); |
92 sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds, | 91 sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds, |
93 false /* is_clipped */, 1.f /* opacity */, SkBlendMode::kSrc, | 92 false /* is_clipped */, 1.f /* opacity */, SkBlendMode::kSrc, |
94 0 /* sorting_context_id */); | 93 0 /* sorting_context_id */); |
95 | 94 |
96 if (bitmap_.get()) { | 95 if (bitmap_.get()) { |
97 gpu::gles2::GLES2Interface* gl = | 96 gpu::gles2::GLES2Interface* gl = |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 // TODO(fsamuel): Implement this. | 233 // TODO(fsamuel): Implement this. |
235 } | 234 } |
236 | 235 |
237 void BitmapUploader::SetExternalTilePriorityConstraints( | 236 void BitmapUploader::SetExternalTilePriorityConstraints( |
238 const gfx::Rect& viewport_rect, | 237 const gfx::Rect& viewport_rect, |
239 const gfx::Transform& transform) { | 238 const gfx::Transform& transform) { |
240 // TODO(fsamuel): Implement this. | 239 // TODO(fsamuel): Implement this. |
241 } | 240 } |
242 | 241 |
243 } // namespace ui | 242 } // namespace ui |
OLD | NEW |