| 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 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1954 output_surface->SetOverlayCandidateValidator(validator.get()); | 1954 output_surface->SetOverlayCandidateValidator(validator.get()); |
| 1955 | 1955 |
| 1956 gfx::Rect viewport_rect(1, 1); | 1956 gfx::Rect viewport_rect(1, 1); |
| 1957 RenderPass* root_pass = | 1957 RenderPass* root_pass = |
| 1958 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), | 1958 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), |
| 1959 viewport_rect, gfx::Transform()); | 1959 viewport_rect, gfx::Transform()); |
| 1960 root_pass->has_transparent_background = false; | 1960 root_pass->has_transparent_background = false; |
| 1961 root_pass->copy_requests.push_back( | 1961 root_pass->copy_requests.push_back( |
| 1962 CopyOutputRequest::CreateRequest(base::Bind(&IgnoreCopyResult))); | 1962 CopyOutputRequest::CreateRequest(base::Bind(&IgnoreCopyResult))); |
| 1963 | 1963 |
| 1964 TextureMailbox mailbox = | 1964 TextureMailbox mailbox = TextureMailbox( |
| 1965 TextureMailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, | 1965 gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, |
| 1966 gfx::Size(256, 256), true, false); | 1966 gfx::Size(256, 256), gfx::GpuMemoryBufferId(), true, false); |
| 1967 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = | 1967 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = |
| 1968 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); | 1968 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); |
| 1969 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( | 1969 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( |
| 1970 mailbox, std::move(release_callback)); | 1970 mailbox, std::move(release_callback)); |
| 1971 bool premultiplied_alpha = false; | 1971 bool premultiplied_alpha = false; |
| 1972 bool flipped = false; | 1972 bool flipped = false; |
| 1973 bool nearest_neighbor = false; | 1973 bool nearest_neighbor = false; |
| 1974 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; | 1974 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; |
| 1975 | 1975 |
| 1976 TextureDrawQuad* overlay_quad = | 1976 TextureDrawQuad* overlay_quad = |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2112 renderer.SetOverlayProcessor(processor); | 2112 renderer.SetOverlayProcessor(processor); |
| 2113 | 2113 |
| 2114 gfx::Rect viewport_rect(1, 1); | 2114 gfx::Rect viewport_rect(1, 1); |
| 2115 RenderPass* root_pass = | 2115 RenderPass* root_pass = |
| 2116 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), | 2116 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), |
| 2117 viewport_rect, gfx::Transform()); | 2117 viewport_rect, gfx::Transform()); |
| 2118 root_pass->has_transparent_background = false; | 2118 root_pass->has_transparent_background = false; |
| 2119 | 2119 |
| 2120 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, | 2120 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, |
| 2121 gpu::CommandBufferId::FromUnsafeValue(0x123), 29); | 2121 gpu::CommandBufferId::FromUnsafeValue(0x123), 29); |
| 2122 TextureMailbox mailbox = | 2122 TextureMailbox mailbox = TextureMailbox( |
| 2123 TextureMailbox(gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D, | 2123 gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D, gfx::Size(256, 256), |
| 2124 gfx::Size(256, 256), true, false); | 2124 gfx::GpuMemoryBufferId(), true, false); |
| 2125 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = | 2125 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = |
| 2126 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); | 2126 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); |
| 2127 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( | 2127 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( |
| 2128 mailbox, std::move(release_callback)); | 2128 mailbox, std::move(release_callback)); |
| 2129 bool premultiplied_alpha = false; | 2129 bool premultiplied_alpha = false; |
| 2130 bool flipped = false; | 2130 bool flipped = false; |
| 2131 bool nearest_neighbor = false; | 2131 bool nearest_neighbor = false; |
| 2132 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; | 2132 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; |
| 2133 gfx::PointF uv_top_left(0, 0); | 2133 gfx::PointF uv_top_left(0, 0); |
| 2134 gfx::PointF uv_bottom_right(1, 1); | 2134 gfx::PointF uv_bottom_right(1, 1); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2149 EXPECT_CALL(overlay_scheduler, | 2149 EXPECT_CALL(overlay_scheduler, |
| 2150 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, | 2150 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, |
| 2151 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); | 2151 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); |
| 2152 | 2152 |
| 2153 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, | 2153 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, |
| 2154 viewport_rect, false); | 2154 viewport_rect, false); |
| 2155 } | 2155 } |
| 2156 | 2156 |
| 2157 } // namespace | 2157 } // namespace |
| 2158 } // namespace cc | 2158 } // namespace cc |
| OLD | NEW |