| 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 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 output_surface->SetOverlayCandidateValidator(validator.get()); | 2038 output_surface->SetOverlayCandidateValidator(validator.get()); |
| 2039 | 2039 |
| 2040 gfx::Rect viewport_rect(1, 1); | 2040 gfx::Rect viewport_rect(1, 1); |
| 2041 RenderPass* root_pass = | 2041 RenderPass* root_pass = |
| 2042 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), | 2042 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), |
| 2043 viewport_rect, gfx::Transform()); | 2043 viewport_rect, gfx::Transform()); |
| 2044 root_pass->has_transparent_background = false; | 2044 root_pass->has_transparent_background = false; |
| 2045 root_pass->copy_requests.push_back( | 2045 root_pass->copy_requests.push_back( |
| 2046 CopyOutputRequest::CreateRequest(base::Bind(&IgnoreCopyResult))); | 2046 CopyOutputRequest::CreateRequest(base::Bind(&IgnoreCopyResult))); |
| 2047 | 2047 |
| 2048 TextureMailbox mailbox = | 2048 TextureMailbox mailbox = TextureMailbox( |
| 2049 TextureMailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, | 2049 gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, |
| 2050 gfx::Size(256, 256), true, false); | 2050 gfx::Size(256, 256), gfx::GpuMemoryBufferHandle(), true, false); |
| 2051 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = | 2051 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = |
| 2052 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); | 2052 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); |
| 2053 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( | 2053 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( |
| 2054 mailbox, std::move(release_callback)); | 2054 mailbox, std::move(release_callback)); |
| 2055 bool premultiplied_alpha = false; | 2055 bool premultiplied_alpha = false; |
| 2056 bool flipped = false; | 2056 bool flipped = false; |
| 2057 bool nearest_neighbor = false; | 2057 bool nearest_neighbor = false; |
| 2058 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; | 2058 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; |
| 2059 | 2059 |
| 2060 TextureDrawQuad* overlay_quad = | 2060 TextureDrawQuad* overlay_quad = |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2196 renderer.SetOverlayProcessor(processor); | 2196 renderer.SetOverlayProcessor(processor); |
| 2197 | 2197 |
| 2198 gfx::Rect viewport_rect(1, 1); | 2198 gfx::Rect viewport_rect(1, 1); |
| 2199 RenderPass* root_pass = | 2199 RenderPass* root_pass = |
| 2200 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), | 2200 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), |
| 2201 viewport_rect, gfx::Transform()); | 2201 viewport_rect, gfx::Transform()); |
| 2202 root_pass->has_transparent_background = false; | 2202 root_pass->has_transparent_background = false; |
| 2203 | 2203 |
| 2204 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, | 2204 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, |
| 2205 gpu::CommandBufferId::FromUnsafeValue(0x123), 29); | 2205 gpu::CommandBufferId::FromUnsafeValue(0x123), 29); |
| 2206 TextureMailbox mailbox = | 2206 TextureMailbox mailbox = TextureMailbox( |
| 2207 TextureMailbox(gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D, | 2207 gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D, gfx::Size(256, 256), |
| 2208 gfx::Size(256, 256), true, false); | 2208 gfx::GpuMemoryBufferHandle(), true, false); |
| 2209 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = | 2209 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = |
| 2210 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); | 2210 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); |
| 2211 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( | 2211 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( |
| 2212 mailbox, std::move(release_callback)); | 2212 mailbox, std::move(release_callback)); |
| 2213 bool premultiplied_alpha = false; | 2213 bool premultiplied_alpha = false; |
| 2214 bool flipped = false; | 2214 bool flipped = false; |
| 2215 bool nearest_neighbor = false; | 2215 bool nearest_neighbor = false; |
| 2216 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; | 2216 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; |
| 2217 gfx::PointF uv_top_left(0, 0); | 2217 gfx::PointF uv_top_left(0, 0); |
| 2218 gfx::PointF uv_bottom_right(1, 1); | 2218 gfx::PointF uv_bottom_right(1, 1); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2233 EXPECT_CALL(overlay_scheduler, | 2233 EXPECT_CALL(overlay_scheduler, |
| 2234 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, | 2234 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, |
| 2235 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); | 2235 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); |
| 2236 | 2236 |
| 2237 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, | 2237 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, |
| 2238 viewport_rect, false); | 2238 viewport_rect, false); |
| 2239 } | 2239 } |
| 2240 | 2240 |
| 2241 } // namespace | 2241 } // namespace |
| 2242 } // namespace cc | 2242 } // namespace cc |
| OLD | NEW |