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

Side by Side Diff: cc/output/gl_renderer_unittest.cc

Issue 2087673002: Remove CreateGpuMemoryBufferFromClientId and plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 months 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
« no previous file with comments | « cc/layers/texture_layer_impl_unittest.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 output_surface->SetOverlayCandidateValidator(validator.get()); 1959 output_surface->SetOverlayCandidateValidator(validator.get());
1960 1960
1961 gfx::Rect viewport_rect(1, 1); 1961 gfx::Rect viewport_rect(1, 1);
1962 RenderPass* root_pass = 1962 RenderPass* root_pass =
1963 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), 1963 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0),
1964 viewport_rect, gfx::Transform()); 1964 viewport_rect, gfx::Transform());
1965 root_pass->has_transparent_background = false; 1965 root_pass->has_transparent_background = false;
1966 root_pass->copy_requests.push_back( 1966 root_pass->copy_requests.push_back(
1967 CopyOutputRequest::CreateRequest(base::Bind(&IgnoreCopyResult))); 1967 CopyOutputRequest::CreateRequest(base::Bind(&IgnoreCopyResult)));
1968 1968
1969 TextureMailbox mailbox = TextureMailbox( 1969 TextureMailbox mailbox =
1970 gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D, 1970 TextureMailbox(gpu::Mailbox::Generate(), gpu::SyncToken(), GL_TEXTURE_2D,
1971 gfx::Size(256, 256), gfx::GpuMemoryBufferId(), true, false); 1971 gfx::Size(256, 256), true, false);
1972 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = 1972 std::unique_ptr<SingleReleaseCallbackImpl> release_callback =
1973 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); 1973 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased));
1974 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( 1974 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox(
1975 mailbox, std::move(release_callback)); 1975 mailbox, std::move(release_callback));
1976 bool premultiplied_alpha = false; 1976 bool premultiplied_alpha = false;
1977 bool flipped = false; 1977 bool flipped = false;
1978 bool nearest_neighbor = false; 1978 bool nearest_neighbor = false;
1979 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; 1979 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f};
1980 1980
1981 TextureDrawQuad* overlay_quad = 1981 TextureDrawQuad* overlay_quad =
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 renderer.SetOverlayProcessor(processor); 2117 renderer.SetOverlayProcessor(processor);
2118 2118
2119 gfx::Rect viewport_rect(1, 1); 2119 gfx::Rect viewport_rect(1, 1);
2120 RenderPass* root_pass = 2120 RenderPass* root_pass =
2121 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), 2121 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0),
2122 viewport_rect, gfx::Transform()); 2122 viewport_rect, gfx::Transform());
2123 root_pass->has_transparent_background = false; 2123 root_pass->has_transparent_background = false;
2124 2124
2125 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, 2125 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0,
2126 gpu::CommandBufferId::FromUnsafeValue(0x123), 29); 2126 gpu::CommandBufferId::FromUnsafeValue(0x123), 29);
2127 TextureMailbox mailbox = TextureMailbox( 2127 TextureMailbox mailbox =
2128 gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D, gfx::Size(256, 256), 2128 TextureMailbox(gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D,
2129 gfx::GpuMemoryBufferId(), true, false); 2129 gfx::Size(256, 256), true, false);
2130 std::unique_ptr<SingleReleaseCallbackImpl> release_callback = 2130 std::unique_ptr<SingleReleaseCallbackImpl> release_callback =
2131 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); 2131 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased));
2132 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( 2132 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox(
2133 mailbox, std::move(release_callback)); 2133 mailbox, std::move(release_callback));
2134 bool premultiplied_alpha = false; 2134 bool premultiplied_alpha = false;
2135 bool flipped = false; 2135 bool flipped = false;
2136 bool nearest_neighbor = false; 2136 bool nearest_neighbor = false;
2137 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; 2137 float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f};
2138 gfx::PointF uv_top_left(0, 0); 2138 gfx::PointF uv_top_left(0, 0);
2139 gfx::PointF uv_bottom_right(1, 1); 2139 gfx::PointF uv_bottom_right(1, 1);
(...skipping 14 matching lines...) Expand all
2154 EXPECT_CALL(overlay_scheduler, 2154 EXPECT_CALL(overlay_scheduler,
2155 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2155 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2156 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2156 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2157 2157
2158 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2158 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2159 viewport_rect, false); 2159 viewport_rect, false);
2160 } 2160 }
2161 2161
2162 } // namespace 2162 } // namespace
2163 } // namespace cc 2163 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_impl_unittest.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698