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

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

Issue 1608303002: Removed OLD_SYNC_POINT sync token namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed cc_perftests, formatted Created 4 years, 11 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
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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 &settings, 894 &settings,
895 output_surface.get(), 895 output_surface.get(),
896 resource_provider.get()); 896 resource_provider.get());
897 897
898 // During initialization we are allowed to set any texture parameters. 898 // During initialization we are allowed to set any texture parameters.
899 EXPECT_CALL(*context, texParameteri(_, _, _)).Times(AnyNumber()); 899 EXPECT_CALL(*context, texParameteri(_, _, _)).Times(AnyNumber());
900 900
901 RenderPass* root_pass = 901 RenderPass* root_pass =
902 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 1), 902 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 1),
903 gfx::Rect(100, 100), gfx::Transform()); 903 gfx::Rect(100, 100), gfx::Transform());
904 unsigned mailbox_sync_point; 904 gpu::SyncToken mailbox_sync_token;
905 AddOneOfEveryQuadType(root_pass, resource_provider.get(), RenderPassId(0, 0), 905 AddOneOfEveryQuadType(root_pass, resource_provider.get(), RenderPassId(0, 0),
906 &mailbox_sync_point); 906 &mailbox_sync_token);
907 907
908 renderer.DecideRenderPassAllocationsForFrame(render_passes_in_draw_order_); 908 renderer.DecideRenderPassAllocationsForFrame(render_passes_in_draw_order_);
909 909
910 // Set up expected texture filter state transitions that match the quads 910 // Set up expected texture filter state transitions that match the quads
911 // created in AppendOneOfEveryQuadType(). 911 // created in AppendOneOfEveryQuadType().
912 Mock::VerifyAndClearExpectations(context); 912 Mock::VerifyAndClearExpectations(context);
913 { 913 {
914 InSequence sequence; 914 InSequence sequence;
915 915
916 // The sync points for all quads are waited on first. This sync point is 916 // The sync points for all quads are waited on first. This sync point is
917 // for a texture quad drawn later in the frame. 917 // for a texture quad drawn later in the frame.
918 gpu::SyncToken mailbox_sync_token(mailbox_sync_point);
919 EXPECT_CALL(*context, waitSyncToken(MatchesSyncToken(mailbox_sync_token))) 918 EXPECT_CALL(*context, waitSyncToken(MatchesSyncToken(mailbox_sync_token)))
920 .Times(1); 919 .Times(1);
921 920
922 // yuv_quad is drawn with the default linear filter. 921 // yuv_quad is drawn with the default linear filter.
923 EXPECT_CALL(*context, drawElements(_, _, _, _)); 922 EXPECT_CALL(*context, drawElements(_, _, _, _));
924 923
925 // tile_quad is drawn with GL_NEAREST because it is not transformed or 924 // tile_quad is drawn with GL_NEAREST because it is not transformed or
926 // scaled. 925 // scaled.
927 EXPECT_CALL( 926 EXPECT_CALL(
928 *context, 927 *context,
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 new SingleOverlayOnTopProcessor(output_surface.get()); 2178 new SingleOverlayOnTopProcessor(output_surface.get());
2180 processor->Initialize(); 2179 processor->Initialize();
2181 renderer.SetOverlayProcessor(processor); 2180 renderer.SetOverlayProcessor(processor);
2182 2181
2183 gfx::Rect viewport_rect(1, 1); 2182 gfx::Rect viewport_rect(1, 1);
2184 RenderPass* root_pass = 2183 RenderPass* root_pass =
2185 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0), 2184 AddRenderPass(&render_passes_in_draw_order_, RenderPassId(1, 0),
2186 viewport_rect, gfx::Transform()); 2185 viewport_rect, gfx::Transform());
2187 root_pass->has_transparent_background = false; 2186 root_pass->has_transparent_background = false;
2188 2187
2189 gpu::SyncToken sync_token(29); 2188 gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, 0x123, 29);
2190 TextureMailbox mailbox = 2189 TextureMailbox mailbox =
2191 TextureMailbox(gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D, 2190 TextureMailbox(gpu::Mailbox::Generate(), sync_token, GL_TEXTURE_2D,
2192 gfx::Size(256, 256), true); 2191 gfx::Size(256, 256), true);
2193 scoped_ptr<SingleReleaseCallbackImpl> release_callback = 2192 scoped_ptr<SingleReleaseCallbackImpl> release_callback =
2194 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased)); 2193 SingleReleaseCallbackImpl::Create(base::Bind(&MailboxReleased));
2195 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox( 2194 ResourceId resource_id = resource_provider->CreateResourceFromTextureMailbox(
2196 mailbox, std::move(release_callback)); 2195 mailbox, std::move(release_callback));
2197 bool premultiplied_alpha = false; 2196 bool premultiplied_alpha = false;
2198 bool flipped = false; 2197 bool flipped = false;
2199 bool nearest_neighbor = false; 2198 bool nearest_neighbor = false;
(...skipping 17 matching lines...) Expand all
2217 EXPECT_CALL(overlay_scheduler, 2216 EXPECT_CALL(overlay_scheduler,
2218 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2217 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2219 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2218 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2220 2219
2221 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2220 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2222 viewport_rect, false); 2221 viewport_rect, false);
2223 } 2222 }
2224 2223
2225 } // namespace 2224 } // namespace
2226 } // namespace cc 2225 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer_unittest.cc ('k') | cc/resources/video_resource_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698