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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 DrawSceneGL(); | 268 DrawSceneGL(); |
269 | 269 |
270 gpu::Mailbox mailbox; | 270 gpu::Mailbox mailbox; |
271 gl_->GenMailboxCHROMIUM(mailbox.name); | 271 gl_->GenMailboxCHROMIUM(mailbox.name); |
272 gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); | 272 gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); |
273 const GLuint64 fence_sync = gl_->InsertFenceSyncCHROMIUM(); | 273 const GLuint64 fence_sync = gl_->InsertFenceSyncCHROMIUM(); |
274 gl_->Flush(); | 274 gl_->Flush(); |
275 | 275 |
276 gpu::SyncToken sync_token; | 276 gpu::SyncToken sync_token; |
277 gl_->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); | 277 gl_->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); |
278 texture_mailbox_ = | 278 texture_mailbox_ = cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D); |
279 cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D, | |
280 gfx::Rect(rect_).size(), false, false); | |
281 } else { | 279 } else { |
282 std::unique_ptr<cc::SharedBitmap> bitmap = | 280 std::unique_ptr<cc::SharedBitmap> bitmap = |
283 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( | 281 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( |
284 gfx::Rect(rect_).size()); | 282 gfx::Rect(rect_).size()); |
285 if (!bitmap) { | 283 if (!bitmap) { |
286 texture_mailbox_ = cc::TextureMailbox(); | 284 texture_mailbox_ = cc::TextureMailbox(); |
287 } else { | 285 } else { |
288 DrawSceneSoftware(bitmap->pixels()); | 286 DrawSceneSoftware(bitmap->pixels()); |
289 texture_mailbox_ = cc::TextureMailbox( | 287 texture_mailbox_ = cc::TextureMailbox( |
290 bitmap.get(), gfx::Size(rect_.width, rect_.height)); | 288 bitmap.get(), gfx::Size(rect_.width, rect_.height)); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 return kPluginPersistsMimeType; | 622 return kPluginPersistsMimeType; |
625 } | 623 } |
626 | 624 |
627 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 625 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
628 return mime_type == TestPlugin::MimeType() || | 626 return mime_type == TestPlugin::MimeType() || |
629 mime_type == PluginPersistsMimeType() || | 627 mime_type == PluginPersistsMimeType() || |
630 mime_type == CanCreateWithoutRendererMimeType(); | 628 mime_type == CanCreateWithoutRendererMimeType(); |
631 } | 629 } |
632 | 630 |
633 } // namespace test_runner | 631 } // namespace test_runner |
OLD | NEW |