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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 DrawSceneGL(); | 258 DrawSceneGL(); |
259 | 259 |
260 gpu::Mailbox mailbox; | 260 gpu::Mailbox mailbox; |
261 gl_->GenMailboxCHROMIUM(mailbox.name); | 261 gl_->GenMailboxCHROMIUM(mailbox.name); |
262 gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); | 262 gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); |
263 const GLuint64 fence_sync = gl_->InsertFenceSyncCHROMIUM(); | 263 const GLuint64 fence_sync = gl_->InsertFenceSyncCHROMIUM(); |
264 gl_->Flush(); | 264 gl_->Flush(); |
265 | 265 |
266 gpu::SyncToken sync_token; | 266 gpu::SyncToken sync_token; |
267 gl_->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); | 267 gl_->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); |
268 texture_mailbox_ = | 268 texture_mailbox_ = cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D); |
269 cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D, | |
270 gfx::Rect(rect_).size(), false, false); | |
271 } else { | 269 } else { |
272 std::unique_ptr<cc::SharedBitmap> bitmap = | 270 std::unique_ptr<cc::SharedBitmap> bitmap = |
273 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( | 271 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( |
274 gfx::Rect(rect_).size()); | 272 gfx::Rect(rect_).size()); |
275 if (!bitmap) { | 273 if (!bitmap) { |
276 texture_mailbox_ = cc::TextureMailbox(); | 274 texture_mailbox_ = cc::TextureMailbox(); |
277 } else { | 275 } else { |
278 DrawSceneSoftware(bitmap->pixels()); | 276 DrawSceneSoftware(bitmap->pixels()); |
279 texture_mailbox_ = cc::TextureMailbox( | 277 texture_mailbox_ = cc::TextureMailbox( |
280 bitmap.get(), gfx::Size(rect_.width, rect_.height)); | 278 bitmap.get(), gfx::Size(rect_.width, rect_.height)); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 return kPluginPersistsMimeType; | 612 return kPluginPersistsMimeType; |
615 } | 613 } |
616 | 614 |
617 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 615 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
618 return mime_type == TestPlugin::MimeType() || | 616 return mime_type == TestPlugin::MimeType() || |
619 mime_type == PluginPersistsMimeType() || | 617 mime_type == PluginPersistsMimeType() || |
620 mime_type == CanCreateWithoutRendererMimeType(); | 618 mime_type == CanCreateWithoutRendererMimeType(); |
621 } | 619 } |
622 | 620 |
623 } // namespace test_runner | 621 } // namespace test_runner |
OLD | NEW |