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

Side by Side Diff: components/test_runner/test_plugin.cc

Issue 1459043003: Revert "Replaced blink sync points with new sync tokens." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | content/common/gpu/client/gl_helper_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 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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 0); 305 0);
306 context_->bindFramebuffer(GL_FRAMEBUFFER, framebuffer_); 306 context_->bindFramebuffer(GL_FRAMEBUFFER, framebuffer_);
307 context_->framebufferTexture2D( 307 context_->framebufferTexture2D(
308 GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, color_texture_, 0); 308 GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, color_texture_, 0);
309 309
310 DrawSceneGL(); 310 DrawSceneGL();
311 311
312 gpu::Mailbox mailbox; 312 gpu::Mailbox mailbox;
313 context_->genMailboxCHROMIUM(mailbox.name); 313 context_->genMailboxCHROMIUM(mailbox.name);
314 context_->produceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); 314 context_->produceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
315 const blink::WGC3Duint64 fence_sync = context_->insertFenceSyncCHROMIUM();
316 context_->flush(); 315 context_->flush();
317
318 gpu::SyncToken sync_token; 316 gpu::SyncToken sync_token;
319 context_->genSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); 317 context_->insertSyncPoint(sync_token.GetData());
320 texture_mailbox_ = cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D); 318 texture_mailbox_ = cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D);
321 } else { 319 } else {
322 scoped_ptr<cc::SharedBitmap> bitmap = 320 scoped_ptr<cc::SharedBitmap> bitmap =
323 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( 321 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap(
324 gfx::Rect(rect_).size()); 322 gfx::Rect(rect_).size());
325 if (!bitmap) { 323 if (!bitmap) {
326 texture_mailbox_ = cc::TextureMailbox(); 324 texture_mailbox_ = cc::TextureMailbox();
327 } else { 325 } else {
328 DrawSceneSoftware(bitmap->pixels()); 326 DrawSceneSoftware(bitmap->pixels());
329 texture_mailbox_ = cc::TextureMailbox( 327 texture_mailbox_ = cc::TextureMailbox(
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 return kPluginPersistsMimeType; 779 return kPluginPersistsMimeType;
782 } 780 }
783 781
784 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 782 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
785 return mime_type == TestPlugin::MimeType() || 783 return mime_type == TestPlugin::MimeType() ||
786 mime_type == PluginPersistsMimeType() || 784 mime_type == PluginPersistsMimeType() ||
787 mime_type == CanCreateWithoutRendererMimeType(); 785 mime_type == CanCreateWithoutRendererMimeType();
788 } 786 }
789 787
790 } // namespace test_runner 788 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/gl_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698