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

Side by Side Diff: sky/engine/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 865153004: Remove dead code related to compositing from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/core/html/HTMLCanvasElement.cpp ('k') | sky/engine/core/page/Page.cpp » ('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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 } 773 }
774 774
775 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) 775 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType)
776 { 776 {
777 if (m_framebufferBinding || isContextLost()) 777 if (m_framebufferBinding || isContextLost())
778 return; 778 return;
779 779
780 drawingBuffer()->markContentsChanged(); 780 drawingBuffer()->markContentsChanged();
781 781
782 m_layerCleared = false; 782 m_layerCleared = false;
783 RenderBox* renderBox = canvas()->renderBox(); 783 if (!m_markedCanvasDirty) {
784 if (renderBox && renderBox->hasAcceleratedCompositing()) {
785 m_markedCanvasDirty = true; 784 m_markedCanvasDirty = true;
786 canvas()->clearCopiedImage(); 785 canvas()->didDraw(FloatRect(FloatPoint(0, 0), clampedCanvasSize()));
787 } else {
788 if (!m_markedCanvasDirty) {
789 m_markedCanvasDirty = true;
790 canvas()->didDraw(FloatRect(FloatPoint(0, 0), clampedCanvasSize()));
791 }
792 } 786 }
793 } 787 }
794 788
795 bool WebGLRenderingContextBase::clearIfComposited(GLbitfield mask) 789 bool WebGLRenderingContextBase::clearIfComposited(GLbitfield mask)
796 { 790 {
797 if (isContextLost()) 791 if (isContextLost())
798 return false; 792 return false;
799 793
800 if (!drawingBuffer()->layerComposited() || m_layerCleared 794 if (!drawingBuffer()->layerComposited() || m_layerCleared
801 || m_requestedAttributes->preserveDrawingBuffer() || (mask && m_framebuf ferBinding)) 795 || m_requestedAttributes->preserveDrawingBuffer() || (mask && m_framebuf ferBinding))
(...skipping 4808 matching lines...) Expand 10 before | Expand all | Expand 10 after
5610 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0; 5604 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0;
5611 } 5605 }
5612 #else 5606 #else
5613 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const 5607 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const
5614 { 5608 {
5615 return m_drawingBuffer.get(); 5609 return m_drawingBuffer.get();
5616 } 5610 }
5617 #endif 5611 #endif
5618 5612
5619 } // namespace blink 5613 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLCanvasElement.cpp ('k') | sky/engine/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698