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_ = cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D); | 268 texture_mailbox_ = |
| 269 cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D, |
| 270 gfx::Rect(rect_).size(), false, false); |
269 } else { | 271 } else { |
270 std::unique_ptr<cc::SharedBitmap> bitmap = | 272 std::unique_ptr<cc::SharedBitmap> bitmap = |
271 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( | 273 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( |
272 gfx::Rect(rect_).size()); | 274 gfx::Rect(rect_).size()); |
273 if (!bitmap) { | 275 if (!bitmap) { |
274 texture_mailbox_ = cc::TextureMailbox(); | 276 texture_mailbox_ = cc::TextureMailbox(); |
275 } else { | 277 } else { |
276 DrawSceneSoftware(bitmap->pixels()); | 278 DrawSceneSoftware(bitmap->pixels()); |
277 texture_mailbox_ = cc::TextureMailbox( | 279 texture_mailbox_ = cc::TextureMailbox( |
278 bitmap.get(), gfx::Size(rect_.width, rect_.height)); | 280 bitmap.get(), gfx::Size(rect_.width, rect_.height)); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 return kPluginPersistsMimeType; | 614 return kPluginPersistsMimeType; |
613 } | 615 } |
614 | 616 |
615 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 617 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
616 return mime_type == TestPlugin::MimeType() || | 618 return mime_type == TestPlugin::MimeType() || |
617 mime_type == PluginPersistsMimeType() || | 619 mime_type == PluginPersistsMimeType() || |
618 mime_type == CanCreateWithoutRendererMimeType(); | 620 mime_type == CanCreateWithoutRendererMimeType(); |
619 } | 621 } |
620 | 622 |
621 } // namespace test_runner | 623 } // namespace test_runner |
OLD | NEW |