OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "cc/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2178 new SingleOverlayOnTopProcessor(output_surface.get()); | 2178 new SingleOverlayOnTopProcessor(output_surface.get()); |
2179 processor->Initialize(); | 2179 processor->Initialize(); |
2180 renderer.SetOverlayProcessor(processor); | 2180 renderer.SetOverlayProcessor(processor); |
2181 | 2181 |
2182 gfx::Rect viewport_rect(1, 1); | 2182 gfx::Rect viewport_rect(1, 1); |
2183 RenderPass* root_pass = | 2183 RenderPass* root_pass = |
2184 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), | 2184 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), |
2185 viewport_rect, gfx::Transform()); | 2185 viewport_rect, gfx::Transform()); |
2186 root_pass->has_transparent_background = false; | 2186 root_pass->has_transparent_background = false; |
2187 | 2187 |
2188 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, 0x123, 29); | 2188 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, |
| 2189 gpu::CommandBufferId::FromUnsafeValue(0x123), 29); |
2189 TextureMailbox mailbox = | 2190 TextureMailbox mailbox = |
2190 TextureMailbox(gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D, | 2191 TextureMailbox(gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D, |
2191 gfx::Size(256, 256), true); | 2192 gfx::Size(256, 256), true); |
2192 scoped_ptr<SingleReleaseCallbackImpl> release_callback = | 2193 scoped_ptr<SingleReleaseCallbackImpl> release_callback = |
2193 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); | 2194 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); |
2194 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( | 2195 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( |
2195 mailbox, std::move(release_callback)); | 2196 mailbox, std::move(release_callback)); |
2196 bool premultiplied_alpha = false; | 2197 bool premultiplied_alpha = false; |
2197 bool flipped = false; | 2198 bool flipped = false; |
2198 bool nearest_neighbor = false; | 2199 bool nearest_neighbor = false; |
(...skipping 17 matching lines...) Expand all Loading... |
2216 EXPECT_CALL(overlay_scheduler, | 2217 EXPECT_CALL(overlay_scheduler, |
2217 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, | 2218 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, |
2218 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); | 2219 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); |
2219 | 2220 |
2220 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, | 2221 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, |
2221 viewport_rect, false); | 2222 viewport_rect, false); |
2222 } | 2223 } |
2223 | 2224 |
2224 } // namespace | 2225 } // namespace |
2225 } // namespace cc | 2226 } // namespace cc |
OLD | NEW |