| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 DrawSceneGL(); | 257 DrawSceneGL(); |
| 258 | 258 |
| 259 gpu::Mailbox mailbox; | 259 gpu::Mailbox mailbox; |
| 260 gl_->GenMailboxCHROMIUM(mailbox.name); | 260 gl_->GenMailboxCHROMIUM(mailbox.name); |
| 261 gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); | 261 gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); |
| 262 const GLuint64 fence_sync = gl_->InsertFenceSyncCHROMIUM(); | 262 const GLuint64 fence_sync = gl_->InsertFenceSyncCHROMIUM(); |
| 263 gl_->Flush(); | 263 gl_->Flush(); |
| 264 | 264 |
| 265 gpu::SyncToken sync_token; | 265 gpu::SyncToken sync_token; |
| 266 context_->genSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); | 266 gl_->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); |
| 267 texture_mailbox_ = cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D); | 267 texture_mailbox_ = cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D); |
| 268 } else { | 268 } else { |
| 269 scoped_ptr<cc::SharedBitmap> bitmap = | 269 scoped_ptr<cc::SharedBitmap> bitmap = |
| 270 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( | 270 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( |
| 271 gfx::Rect(rect_).size()); | 271 gfx::Rect(rect_).size()); |
| 272 if (!bitmap) { | 272 if (!bitmap) { |
| 273 texture_mailbox_ = cc::TextureMailbox(); | 273 texture_mailbox_ = cc::TextureMailbox(); |
| 274 } else { | 274 } else { |
| 275 DrawSceneSoftware(bitmap->pixels()); | 275 DrawSceneSoftware(bitmap->pixels()); |
| 276 texture_mailbox_ = cc::TextureMailbox( | 276 texture_mailbox_ = cc::TextureMailbox( |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 return kPluginPersistsMimeType; | 723 return kPluginPersistsMimeType; |
| 724 } | 724 } |
| 725 | 725 |
| 726 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 726 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
| 727 return mime_type == TestPlugin::MimeType() || | 727 return mime_type == TestPlugin::MimeType() || |
| 728 mime_type == PluginPersistsMimeType() || | 728 mime_type == PluginPersistsMimeType() || |
| 729 mime_type == CanCreateWithoutRendererMimeType(); | 729 mime_type == CanCreateWithoutRendererMimeType(); |
| 730 } | 730 } |
| 731 | 731 |
| 732 } // namespace test_runner | 732 } // namespace test_runner |
| OLD | NEW |