OLD | NEW |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 #include "core/html/canvas/WebGLLoseContext.h" | 71 #include "core/html/canvas/WebGLLoseContext.h" |
72 #include "core/html/canvas/WebGLProgram.h" | 72 #include "core/html/canvas/WebGLProgram.h" |
73 #include "core/html/canvas/WebGLRenderbuffer.h" | 73 #include "core/html/canvas/WebGLRenderbuffer.h" |
74 #include "core/html/canvas/WebGLShader.h" | 74 #include "core/html/canvas/WebGLShader.h" |
75 #include "core/html/canvas/WebGLShaderPrecisionFormat.h" | 75 #include "core/html/canvas/WebGLShaderPrecisionFormat.h" |
76 #include "core/html/canvas/WebGLSharedWebGraphicsContext3D.h" | 76 #include "core/html/canvas/WebGLSharedWebGraphicsContext3D.h" |
77 #include "core/html/canvas/WebGLTexture.h" | 77 #include "core/html/canvas/WebGLTexture.h" |
78 #include "core/html/canvas/WebGLUniformLocation.h" | 78 #include "core/html/canvas/WebGLUniformLocation.h" |
79 #include "core/inspector/ConsoleMessage.h" | 79 #include "core/inspector/ConsoleMessage.h" |
80 #include "core/inspector/InspectorInstrumentation.h" | 80 #include "core/inspector/InspectorInstrumentation.h" |
| 81 #include "core/layout/LayoutBox.h" |
81 #include "core/loader/FrameLoader.h" | 82 #include "core/loader/FrameLoader.h" |
82 #include "core/loader/FrameLoaderClient.h" | 83 #include "core/loader/FrameLoaderClient.h" |
83 #include "core/rendering/RenderBox.h" | |
84 #include "platform/CheckedInt.h" | 84 #include "platform/CheckedInt.h" |
85 #include "platform/NotImplemented.h" | 85 #include "platform/NotImplemented.h" |
86 #include "platform/RuntimeEnabledFeatures.h" | 86 #include "platform/RuntimeEnabledFeatures.h" |
87 #include "platform/geometry/IntSize.h" | 87 #include "platform/geometry/IntSize.h" |
88 #include "platform/graphics/GraphicsContext.h" | 88 #include "platform/graphics/GraphicsContext.h" |
89 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 89 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
90 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" | 90 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" |
91 #include "platform/graphics/gpu/DrawingBuffer.h" | 91 #include "platform/graphics/gpu/DrawingBuffer.h" |
92 #include "public/platform/Platform.h" | 92 #include "public/platform/Platform.h" |
93 #include "wtf/ArrayBufferContents.h" | 93 #include "wtf/ArrayBufferContents.h" |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 #endif | 844 #endif |
845 } | 845 } |
846 | 846 |
847 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) | 847 void WebGLRenderingContextBase::markContextChanged(ContentChangeType changeType) |
848 { | 848 { |
849 if (m_framebufferBinding || isContextLost()) | 849 if (m_framebufferBinding || isContextLost()) |
850 return; | 850 return; |
851 | 851 |
852 drawingBuffer()->markContentsChanged(); | 852 drawingBuffer()->markContentsChanged(); |
853 | 853 |
854 RenderBox* renderBox = canvas()->renderBox(); | 854 LayoutBox* layoutBox = canvas()->layoutBox(); |
855 if (renderBox && renderBox->hasAcceleratedCompositing()) { | 855 if (layoutBox && layoutBox->hasAcceleratedCompositing()) { |
856 m_markedCanvasDirty = true; | 856 m_markedCanvasDirty = true; |
857 canvas()->clearCopiedImage(); | 857 canvas()->clearCopiedImage(); |
858 renderBox->contentChanged(changeType); | 858 layoutBox->contentChanged(changeType); |
859 } else { | 859 } else { |
860 if (!m_markedCanvasDirty) { | 860 if (!m_markedCanvasDirty) { |
861 m_markedCanvasDirty = true; | 861 m_markedCanvasDirty = true; |
862 canvas()->didDraw(FloatRect(FloatPoint(0, 0), clampedCanvasSize())); | 862 canvas()->didDraw(FloatRect(FloatPoint(0, 0), clampedCanvasSize())); |
863 } | 863 } |
864 } | 864 } |
865 } | 865 } |
866 | 866 |
867 WebGLRenderingContextBase::HowToClear WebGLRenderingContextBase::clearIfComposit
ed(GLbitfield mask) | 867 WebGLRenderingContextBase::HowToClear WebGLRenderingContextBase::clearIfComposit
ed(GLbitfield mask) |
868 { | 868 { |
(...skipping 5136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6005 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 6005 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
6006 } | 6006 } |
6007 #else | 6007 #else |
6008 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6008 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
6009 { | 6009 { |
6010 return m_drawingBuffer.get(); | 6010 return m_drawingBuffer.get(); |
6011 } | 6011 } |
6012 #endif | 6012 #endif |
6013 | 6013 |
6014 } // namespace blink | 6014 } // namespace blink |
OLD | NEW |