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

Side by Side Diff: Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 1152733008: remove |level| in copyVideoTextureToPlatformTexture(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add TODO Created 5 years, 6 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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 GLenum destType, GLint level, bool premultiplyAlpha, bool flipY, SourceDrawi ngBuffer sourceBuffer) 475 GLenum destType, GLint level, bool premultiplyAlpha, bool flipY, SourceDrawi ngBuffer sourceBuffer)
476 { 476 {
477 if (m_contentsChanged) { 477 if (m_contentsChanged) {
478 if (m_multisampleMode != None) { 478 if (m_multisampleMode != None) {
479 commit(); 479 commit();
480 restoreFramebufferBinding(); 480 restoreFramebufferBinding();
481 } 481 }
482 m_context->flush(); 482 m_context->flush();
483 } 483 }
484 484
485 if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(internalFormat, destType, l evel)) 485 if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D, internalForm at, destType, level))
486 return false; 486 return false;
487 487
488 // Contexts may be in a different share group. We must transfer the texture through a mailbox first 488 // Contexts may be in a different share group. We must transfer the texture through a mailbox first
489 WebExternalTextureMailbox mailbox; 489 WebExternalTextureMailbox mailbox;
490 GLint textureId = 0; 490 GLint textureId = 0;
491 if (sourceBuffer == FrontBuffer && m_frontColorBuffer.texInfo.textureId) { 491 if (sourceBuffer == FrontBuffer && m_frontColorBuffer.texInfo.textureId) {
492 textureId = m_frontColorBuffer.texInfo.textureId; 492 textureId = m_frontColorBuffer.texInfo.textureId;
493 mailbox = m_frontColorBuffer.mailbox; 493 mailbox = m_frontColorBuffer.mailbox;
494 } else { 494 } else {
495 textureId = m_colorBuffer.textureId; 495 textureId = m_colorBuffer.textureId;
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) 994 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info)
995 { 995 {
996 if (info->imageId) { 996 if (info->imageId) {
997 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); 997 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId);
998 m_context->destroyImageCHROMIUM(info->imageId); 998 m_context->destroyImageCHROMIUM(info->imageId);
999 info->imageId = 0; 999 info->imageId = 0;
1000 } 1000 }
1001 } 1001 }
1002 1002
1003 } // namespace blink 1003 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | Source/platform/graphics/gpu/Extensions3DUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698