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

Side by Side Diff: Source/WebCore/html/canvas/WebGLRenderingContext.cpp

Issue 7664004: Merge 92908 - Readback composited webgl results for printing (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/platform/graphics/GraphicsContext3D.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 void WebGLRenderingContext::markLayerComposited() 560 void WebGLRenderingContext::markLayerComposited()
561 { 561 {
562 m_context->markLayerComposited(); 562 m_context->markLayerComposited();
563 } 563 }
564 564
565 void WebGLRenderingContext::paintRenderingResultsToCanvas() 565 void WebGLRenderingContext::paintRenderingResultsToCanvas()
566 { 566 {
567 // Until the canvas is written to by the application, the clear that 567 // Until the canvas is written to by the application, the clear that
568 // happened after it was composited should be ignored by the compositor. 568 // happened after it was composited should be ignored by the compositor.
569 if (m_context->layerComposited() && !m_attributes.preserveDrawingBuffer) 569 if (m_context->layerComposited() && !m_attributes.preserveDrawingBuffer) {
570 m_context->paintCompositedResultsToCanvas(this);
570 canvas()->makePresentationCopy(); 571 canvas()->makePresentationCopy();
571 else 572 } else
572 canvas()->clearPresentationCopy(); 573 canvas()->clearPresentationCopy();
573 clearIfComposited(); 574 clearIfComposited();
574 if (!m_markedCanvasDirty && !m_layerCleared) 575 if (!m_markedCanvasDirty && !m_layerCleared)
575 return; 576 return;
576 canvas()->clearCopiedImage(); 577 canvas()->clearCopiedImage();
577 m_markedCanvasDirty = false; 578 m_markedCanvasDirty = false;
578 m_context->paintRenderingResultsToCanvas(this); 579 m_context->paintRenderingResultsToCanvas(this);
579 } 580 }
580 581
581 PassRefPtr<ImageData> WebGLRenderingContext::paintRenderingResultsToImageData() 582 PassRefPtr<ImageData> WebGLRenderingContext::paintRenderingResultsToImageData()
(...skipping 4283 matching lines...) Expand 10 before | Expand all | Expand 10 after
4865 4866
4866 void WebGLRenderingContext::LRUImageBufferCache::bubbleToFront(int idx) 4867 void WebGLRenderingContext::LRUImageBufferCache::bubbleToFront(int idx)
4867 { 4868 {
4868 for (int i = idx; i > 0; --i) 4869 for (int i = idx; i > 0; --i)
4869 m_buffers[i].swap(m_buffers[i-1]); 4870 m_buffers[i].swap(m_buffers[i-1]);
4870 } 4871 }
4871 4872
4872 } // namespace WebCore 4873 } // namespace WebCore
4873 4874
4874 #endif // ENABLE(WEBGL) 4875 #endif // ENABLE(WEBGL)
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/platform/graphics/GraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698