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

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

Issue 2418173002: Fix HTML5 video blurry (Closed)
Patch Set: fix nits Created 4 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
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 <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
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_ = cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D); 278 texture_mailbox_ =
279 cc::TextureMailbox(mailbox, sync_token, GL_TEXTURE_2D,
280 gfx::Rect(rect_).size(), false, false);
279 } else { 281 } else {
280 std::unique_ptr<cc::SharedBitmap> bitmap = 282 std::unique_ptr<cc::SharedBitmap> bitmap =
281 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap( 283 delegate_->GetSharedBitmapManager()->AllocateSharedBitmap(
282 gfx::Rect(rect_).size()); 284 gfx::Rect(rect_).size());
283 if (!bitmap) { 285 if (!bitmap) {
284 texture_mailbox_ = cc::TextureMailbox(); 286 texture_mailbox_ = cc::TextureMailbox();
285 } else { 287 } else {
286 DrawSceneSoftware(bitmap->pixels()); 288 DrawSceneSoftware(bitmap->pixels());
287 texture_mailbox_ = cc::TextureMailbox( 289 texture_mailbox_ = cc::TextureMailbox(
288 bitmap.get(), gfx::Size(rect_.width, rect_.height)); 290 bitmap.get(), gfx::Size(rect_.width, rect_.height));
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 return kPluginPersistsMimeType; 624 return kPluginPersistsMimeType;
623 } 625 }
624 626
625 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 627 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
626 return mime_type == TestPlugin::MimeType() || 628 return mime_type == TestPlugin::MimeType() ||
627 mime_type == PluginPersistsMimeType() || 629 mime_type == PluginPersistsMimeType() ||
628 mime_type == CanCreateWithoutRendererMimeType(); 630 mime_type == CanCreateWithoutRendererMimeType();
629 } 631 }
630 632
631 } // namespace test_runner 633 } // namespace test_runner
OLDNEW
« no previous file with comments | « cc/test/test_in_process_context_provider.cc ('k') | content/browser/renderer_host/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698