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

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

Issue 1551143002: Remove the "target" argument from CopyTextureChromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error. Created 4 years, 11 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 m_context->framebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COL OR_ATTACHMENT0, GL_TEXTURE_2D, m_colorBuffer.textureId, 0, m_sampleCount); 299 m_context->framebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COL OR_ATTACHMENT0, GL_TEXTURE_2D, m_colorBuffer.textureId, 0, m_sampleCount);
300 else 300 else
301 m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D, m_colorBuffer.textureId, 0); 301 m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D, m_colorBuffer.textureId, 0);
302 302
303 if (m_discardFramebufferSupported) { 303 if (m_discardFramebufferSupported) {
304 // Explicitly discard framebuffer to save GPU memory bandwidth for t ile-based GPU arch. 304 // Explicitly discard framebuffer to save GPU memory bandwidth for t ile-based GPU arch.
305 const WGC3Denum attachments[3] = { GL_COLOR_ATTACHMENT0, GL_DEPTH_AT TACHMENT, GL_STENCIL_ATTACHMENT}; 305 const WGC3Denum attachments[3] = { GL_COLOR_ATTACHMENT0, GL_DEPTH_AT TACHMENT, GL_STENCIL_ATTACHMENT};
306 m_context->discardFramebufferEXT(GL_FRAMEBUFFER, 3, attachments); 306 m_context->discardFramebufferEXT(GL_FRAMEBUFFER, 3, attachments);
307 } 307 }
308 } else { 308 } else {
309 m_context->copyTextureCHROMIUM(GL_TEXTURE_2D, m_colorBuffer.textureId, f rontColorBufferMailbox->textureInfo.textureId, GL_RGBA, GL_UNSIGNED_BYTE, GL_FAL SE, GL_FALSE, GL_FALSE); 309 m_context->copyTextureCHROMIUM(m_colorBuffer.textureId, frontColorBuffer Mailbox->textureInfo.textureId, GL_RGBA, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, G L_FALSE);
310 } 310 }
311 311
312 restoreFramebufferBindings(); 312 restoreFramebufferBindings();
313 m_contentsChanged = false; 313 m_contentsChanged = false;
314 314
315 m_context->produceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo .textureId, GL_TEXTURE_2D, frontColorBufferMailbox->mailbox.name); 315 m_context->produceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo .textureId, GL_TEXTURE_2D, frontColorBufferMailbox->mailbox.name);
316 m_context->flush(); 316 m_context->flush();
317 frontColorBufferMailbox->mailbox.validSyncToken = m_context->insertSyncPoint (frontColorBufferMailbox->mailbox.syncToken); 317 frontColorBufferMailbox->mailbox.validSyncToken = m_context->insertSyncPoint (frontColorBufferMailbox->mailbox.syncToken);
318 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0; 318 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0;
319 setBufferClearNeeded(true); 319 setBufferClearNeeded(true);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 context->waitSyncTokenCHROMIUM(mailbox.syncToken); 521 context->waitSyncTokenCHROMIUM(mailbox.syncToken);
522 Platform3DObject sourceTexture = context->createAndConsumeTextureCHROMIUM(GL _TEXTURE_2D, mailbox.name); 522 Platform3DObject sourceTexture = context->createAndConsumeTextureCHROMIUM(GL _TEXTURE_2D, mailbox.name);
523 523
524 GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE; 524 GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE;
525 GLboolean unpackUnpremultiplyAlphaNeeded = GL_FALSE; 525 GLboolean unpackUnpremultiplyAlphaNeeded = GL_FALSE;
526 if (m_actualAttributes.alpha && m_actualAttributes.premultipliedAlpha && !pr emultiplyAlpha) 526 if (m_actualAttributes.alpha && m_actualAttributes.premultipliedAlpha && !pr emultiplyAlpha)
527 unpackUnpremultiplyAlphaNeeded = GL_TRUE; 527 unpackUnpremultiplyAlphaNeeded = GL_TRUE;
528 else if (m_actualAttributes.alpha && !m_actualAttributes.premultipliedAlpha && premultiplyAlpha) 528 else if (m_actualAttributes.alpha && !m_actualAttributes.premultipliedAlpha && premultiplyAlpha)
529 unpackPremultiplyAlphaNeeded = GL_TRUE; 529 unpackPremultiplyAlphaNeeded = GL_TRUE;
530 530
531 context->copyTextureCHROMIUM(GL_TEXTURE_2D, sourceTexture, texture, internal Format, destType, flipY, unpackPremultiplyAlphaNeeded, unpackUnpremultiplyAlphaN eeded); 531 context->copyTextureCHROMIUM(sourceTexture, texture, internalFormat, destTyp e, flipY, unpackPremultiplyAlphaNeeded, unpackUnpremultiplyAlphaNeeded);
532 532
533 context->deleteTexture(sourceTexture); 533 context->deleteTexture(sourceTexture);
534 534
535 context->flush(); 535 context->flush();
536 GLbyte syncToken[24]; 536 GLbyte syncToken[24];
537 if (context->insertSyncPoint(syncToken)) 537 if (context->insertSyncPoint(syncToken))
538 m_context->waitSyncTokenCHROMIUM(syncToken); 538 m_context->waitSyncTokenCHROMIUM(syncToken);
539 539
540 return true; 540 return true;
541 } 541 }
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) 984 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info)
985 { 985 {
986 if (info->imageId) { 986 if (info->imageId) {
987 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); 987 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId);
988 m_context->destroyImageCHROMIUM(info->imageId); 988 m_context->destroyImageCHROMIUM(info->imageId);
989 info->imageId = 0; 989 info->imageId = 0;
990 } 990 }
991 } 991 }
992 992
993 } // namespace blink 993 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp ('k') | third_party/WebKit/public/platform/WebGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698