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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 2418173002: Fix HTML5 video blurry (Closed)
Patch Set: fix plugin test Created 4 years, 2 months 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 // there is no need for animations to be double buffered. 422 // there is no need for animations to be double buffered.
423 mailboxInfo.m_image.reset(); 423 mailboxInfo.m_image.reset();
424 } else { 424 } else {
425 // FIXME: We'd rather insert a syncpoint than perform a flush here, 425 // FIXME: We'd rather insert a syncpoint than perform a flush here,
426 // but currently the canvas will flicker if we don't flush here. 426 // but currently the canvas will flicker if we don't flush here.
427 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM(); 427 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM();
428 gl->Flush(); 428 gl->Flush();
429 gl->GenSyncTokenCHROMIUM(fenceSync, syncToken.GetData()); 429 gl->GenSyncTokenCHROMIUM(fenceSync, syncToken.GetData());
430 } 430 }
431 mailboxInfo.m_mailbox = mailbox; 431 mailboxInfo.m_mailbox = mailbox;
432 *outMailbox = cc::TextureMailbox(mailbox, syncToken, GL_TEXTURE_2D); 432 *outMailbox = cc::TextureMailbox(mailbox, syncToken, GL_TEXTURE_2D, m_size,
enne (OOO) 2016/10/19 19:04:03 Why did this need to change?
dshwang 2016/10/20 18:57:56 It's the bug I mentioned above. without this chang
433 false, false);
433 434
434 gl->BindTexture(GL_TEXTURE_2D, 0); 435 gl->BindTexture(GL_TEXTURE_2D, 0);
435 // Because we are changing the texture binding without going through skia, 436 // Because we are changing the texture binding without going through skia,
436 // we must dirty the context. 437 // we must dirty the context.
437 grContext->resetContext(kTextureBinding_GrGLBackendState); 438 grContext->resetContext(kTextureBinding_GrGLBackendState);
438 return true; 439 return true;
439 } 440 }
440 441
441 void Canvas2DLayerBridge::resetSkiaTextureBinding() { 442 void Canvas2DLayerBridge::resetSkiaTextureBinding() {
442 GrContext* grContext = m_contextProvider->grContext(); 443 GrContext* grContext = m_contextProvider->grContext();
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 default; 1133 default;
1133 1134
1134 void Canvas2DLayerBridge::Logger::reportHibernationEvent( 1135 void Canvas2DLayerBridge::Logger::reportHibernationEvent(
1135 HibernationEvent event) { 1136 HibernationEvent event) {
1136 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, 1137 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram,
1137 ("Canvas.HibernationEvents", HibernationEventCount)); 1138 ("Canvas.HibernationEvents", HibernationEventCount));
1138 hibernationHistogram.count(event); 1139 hibernationHistogram.count(event);
1139 } 1140 }
1140 1141
1141 } // namespace blink 1142 } // namespace blink
OLDNEW
« cc/output/renderer_pixeltest.cc ('K') | « media/renderers/skcanvas_video_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698