OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/test_runner/test_plugin.h" | 5 #include "components/test_runner/test_plugin.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 static void IgnoreReleaseCallback(const gpu::SyncToken& sync_token, bool lost) { | 301 static void IgnoreReleaseCallback(const gpu::SyncToken& sync_token, bool lost) { |
302 } | 302 } |
303 | 303 |
304 static void ReleaseSharedMemory(std::unique_ptr<cc::SharedBitmap> bitmap, | 304 static void ReleaseSharedMemory(std::unique_ptr<cc::SharedBitmap> bitmap, |
305 const gpu::SyncToken& sync_token, | 305 const gpu::SyncToken& sync_token, |
306 bool lost) {} | 306 bool lost) {} |
307 | 307 |
308 bool TestPlugin::PrepareTextureMailbox( | 308 bool TestPlugin::PrepareTextureMailbox( |
309 cc::TextureMailbox* mailbox, | 309 cc::TextureMailbox* mailbox, |
310 std::unique_ptr<cc::SingleReleaseCallback>* release_callback, | 310 std::unique_ptr<cc::SingleReleaseCallback>* release_callback) { |
311 bool use_shared_memory) { | |
312 if (!mailbox_changed_) | 311 if (!mailbox_changed_) |
313 return false; | 312 return false; |
314 *mailbox = texture_mailbox_; | 313 *mailbox = texture_mailbox_; |
315 if (texture_mailbox_.IsTexture()) { | 314 if (texture_mailbox_.IsTexture()) { |
316 *release_callback = | 315 *release_callback = |
317 cc::SingleReleaseCallback::Create(base::Bind(&IgnoreReleaseCallback)); | 316 cc::SingleReleaseCallback::Create(base::Bind(&IgnoreReleaseCallback)); |
318 } else if (texture_mailbox_.IsSharedMemory()) { | 317 } else if (texture_mailbox_.IsSharedMemory()) { |
319 *release_callback = cc::SingleReleaseCallback::Create( | 318 *release_callback = cc::SingleReleaseCallback::Create( |
320 base::Bind(&ReleaseSharedMemory, base::Passed(&shared_bitmap_))); | 319 base::Bind(&ReleaseSharedMemory, base::Passed(&shared_bitmap_))); |
321 } | 320 } |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 return kPluginPersistsMimeType; | 731 return kPluginPersistsMimeType; |
733 } | 732 } |
734 | 733 |
735 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 734 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
736 return mime_type == TestPlugin::MimeType() || | 735 return mime_type == TestPlugin::MimeType() || |
737 mime_type == PluginPersistsMimeType() || | 736 mime_type == PluginPersistsMimeType() || |
738 mime_type == CanCreateWithoutRendererMimeType(); | 737 mime_type == CanCreateWithoutRendererMimeType(); |
739 } | 738 } |
740 | 739 |
741 } // namespace test_runner | 740 } // namespace test_runner |
OLD | NEW |