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

Side by Side Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 1951193002: cc: Add mailbox support to ResourceProvider write locks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@worker_context_stream
Patch Set: ericrk's review 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
« cc/tiles/tile_manager.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/layers/heads_up_display_layer.h" 9 #include "cc/layers/heads_up_display_layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 gpu::SyncToken mailbox_sync_token; 935 gpu::SyncToken mailbox_sync_token;
936 AddOneOfEveryQuadType(pass.get(), child_resource_provider_.get(), 936 AddOneOfEveryQuadType(pass.get(), child_resource_provider_.get(),
937 RenderPassId(2, 1), &mailbox_sync_token); 937 RenderPassId(2, 1), &mailbox_sync_token);
938 938
939 frame_data->render_pass_list.push_back(std::move(pass_for_quad)); 939 frame_data->render_pass_list.push_back(std::move(pass_for_quad));
940 frame_data->render_pass_list.push_back(std::move(pass)); 940 frame_data->render_pass_list.push_back(std::move(pass));
941 941
942 ResourceId resource = child_resource_provider_->CreateResource( 942 ResourceId resource = child_resource_provider_->CreateResource(
943 gfx::Size(4, 4), ResourceProvider::TEXTURE_HINT_IMMUTABLE, RGBA_8888); 943 gfx::Size(4, 4), ResourceProvider::TEXTURE_HINT_IMMUTABLE, RGBA_8888);
944 ResourceProvider::ScopedWriteLockGL lock(child_resource_provider_.get(), 944 ResourceProvider::ScopedWriteLockGL lock(child_resource_provider_.get(),
945 resource); 945 resource, false);
946 946
947 gpu::Mailbox mailbox; 947 gpu::Mailbox mailbox;
948 gl->GenMailboxCHROMIUM(mailbox.name); 948 gl->GenMailboxCHROMIUM(mailbox.name);
949 949
950 const GLuint64 fence_sync = gl->InsertFenceSyncCHROMIUM(); 950 const GLuint64 fence_sync = gl->InsertFenceSyncCHROMIUM();
951 gl->ShallowFlushCHROMIUM(); 951 gl->ShallowFlushCHROMIUM();
952 952
953 gpu::SyncToken sync_token; 953 gpu::SyncToken sync_token;
954 gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); 954 gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
955 955
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 void AfterTest() override {} 1603 void AfterTest() override {}
1604 1604
1605 bool deferred_; 1605 bool deferred_;
1606 }; 1606 };
1607 1607
1608 SINGLE_AND_MULTI_THREAD_TEST_F( 1608 SINGLE_AND_MULTI_THREAD_TEST_F(
1609 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); 1609 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame);
1610 1610
1611 } // namespace 1611 } // namespace
1612 } // namespace cc 1612 } // namespace cc
OLDNEW
« cc/tiles/tile_manager.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698