OLD | NEW |
---|---|
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 gfx::PointF uv0 = quad->uv_top_left; | 91 gfx::PointF uv0 = quad->uv_top_left; |
92 gfx::PointF uv1 = quad->uv_bottom_right; | 92 gfx::PointF uv1 = quad->uv_bottom_right; |
93 Float4 xform = { { uv0.x(), uv0.y(), uv1.x() - uv0.x(), uv1.y() - uv0.y() } }; | 93 Float4 xform = { { uv0.x(), uv0.y(), uv1.x() - uv0.x(), uv1.y() - uv0.y() } }; |
94 if (quad->flipped) { | 94 if (quad->flipped) { |
95 xform.data[1] = 1.0f - xform.data[1]; | 95 xform.data[1] = 1.0f - xform.data[1]; |
96 xform.data[3] = -xform.data[3]; | 96 xform.data[3] = -xform.data[3]; |
97 } | 97 } |
98 return xform; | 98 return xform; |
99 } | 99 } |
100 | 100 |
101 Float4 PremultipliedColor(SkColor color) { | |
102 const float factor = 1.0f / 255.0f; | |
103 const float alpha = SkColorGetA(color) * factor; | |
104 | |
105 Float4 result = { { | |
106 SkColorGetR(color) * factor * alpha, | |
107 SkColorGetG(color) * factor * alpha, | |
108 SkColorGetB(color) * factor * alpha, | |
109 alpha | |
110 } }; | |
111 return result; | |
112 } | |
113 | |
101 // Smallest unit that impact anti-aliasing output. We use this to | 114 // Smallest unit that impact anti-aliasing output. We use this to |
102 // determine when anti-aliasing is unnecessary. | 115 // determine when anti-aliasing is unnecessary. |
103 const float kAntiAliasingEpsilon = 1.0f / 1024.0f; | 116 const float kAntiAliasingEpsilon = 1.0f / 1024.0f; |
104 | 117 |
105 } // anonymous namespace | 118 } // anonymous namespace |
106 | 119 |
107 struct GLRenderer::PendingAsyncReadPixels { | 120 struct GLRenderer::PendingAsyncReadPixels { |
108 PendingAsyncReadPixels() : buffer(0) {} | 121 PendingAsyncReadPixels() : buffer(0) {} |
109 | 122 |
110 scoped_ptr<CopyOutputRequest> copy_request; | 123 scoped_ptr<CopyOutputRequest> copy_request; |
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1644 DrawContentQuad(frame, quad, on_demand_tile_raster_resource_id_); | 1657 DrawContentQuad(frame, quad, on_demand_tile_raster_resource_id_); |
1645 } | 1658 } |
1646 | 1659 |
1647 struct TextureProgramBinding { | 1660 struct TextureProgramBinding { |
1648 template <class Program> | 1661 template <class Program> |
1649 void Set(Program* program, WebKit::WebGraphicsContext3D* context) { | 1662 void Set(Program* program, WebKit::WebGraphicsContext3D* context) { |
1650 DCHECK(program && (program->initialized() || context->isContextLost())); | 1663 DCHECK(program && (program->initialized() || context->isContextLost())); |
1651 program_id = program->program(); | 1664 program_id = program->program(); |
1652 sampler_location = program->fragment_shader().sampler_location(); | 1665 sampler_location = program->fragment_shader().sampler_location(); |
1653 matrix_location = program->vertex_shader().matrix_location(); | 1666 matrix_location = program->vertex_shader().matrix_location(); |
1654 alpha_location = program->fragment_shader().alpha_location(); | 1667 background_color_location = |
1668 program->fragment_shader().background_color_location(); | |
1655 } | 1669 } |
1656 int program_id; | 1670 int program_id; |
1657 int sampler_location; | 1671 int sampler_location; |
1658 int matrix_location; | 1672 int matrix_location; |
1659 int alpha_location; | 1673 int background_color_location; |
1660 }; | 1674 }; |
1661 | 1675 |
1662 struct TexTransformTextureProgramBinding : TextureProgramBinding { | 1676 struct TexTransformTextureProgramBinding : TextureProgramBinding { |
1663 template <class Program> | 1677 template <class Program> |
1664 void Set(Program* program, WebKit::WebGraphicsContext3D* context) { | 1678 void Set(Program* program, WebKit::WebGraphicsContext3D* context) { |
1665 TextureProgramBinding::Set(program, context); | 1679 TextureProgramBinding::Set(program, context); |
1666 tex_transform_location = program->vertex_shader().tex_transform_location(); | 1680 tex_transform_location = program->vertex_shader().tex_transform_location(); |
1667 vertex_opacity_location = | 1681 vertex_opacity_location = |
1668 program->vertex_shader().vertex_opacity_location(); | 1682 program->vertex_shader().vertex_opacity_location(); |
1669 } | 1683 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1703 context_->uniformMatrix4fv( | 1717 context_->uniformMatrix4fv( |
1704 static_cast<int>(draw_cache_.matrix_location), | 1718 static_cast<int>(draw_cache_.matrix_location), |
1705 static_cast<int>(draw_cache_.matrix_data.size()), | 1719 static_cast<int>(draw_cache_.matrix_data.size()), |
1706 false, | 1720 false, |
1707 reinterpret_cast<float*>(&draw_cache_.matrix_data.front()))); | 1721 reinterpret_cast<float*>(&draw_cache_.matrix_data.front()))); |
1708 GLC(context_, | 1722 GLC(context_, |
1709 context_->uniform4fv( | 1723 context_->uniform4fv( |
1710 static_cast<int>(draw_cache_.uv_xform_location), | 1724 static_cast<int>(draw_cache_.uv_xform_location), |
1711 static_cast<int>(draw_cache_.uv_xform_data.size()), | 1725 static_cast<int>(draw_cache_.uv_xform_data.size()), |
1712 reinterpret_cast<float*>(&draw_cache_.uv_xform_data.front()))); | 1726 reinterpret_cast<float*>(&draw_cache_.uv_xform_data.front()))); |
1727 | |
1728 if (draw_cache_.background_color != SK_ColorTRANSPARENT) { | |
1729 Float4 background_color = PremultipliedColor(draw_cache_.background_color); | |
1730 GLC(context_, | |
1731 context_->uniform4fv( | |
1732 draw_cache_.background_color_location, 1, background_color.data)); | |
1733 } | |
1734 | |
1713 GLC(context_, | 1735 GLC(context_, |
1714 context_->uniform1fv( | 1736 context_->uniform1fv( |
1715 static_cast<int>(draw_cache_.vertex_opacity_location), | 1737 static_cast<int>(draw_cache_.vertex_opacity_location), |
1716 static_cast<int>(draw_cache_.vertex_opacity_data.size()), | 1738 static_cast<int>(draw_cache_.vertex_opacity_data.size()), |
1717 static_cast<float*>(&draw_cache_.vertex_opacity_data.front()))); | 1739 static_cast<float*>(&draw_cache_.vertex_opacity_data.front()))); |
1718 | 1740 |
1719 // Draw the quads! | 1741 // Draw the quads! |
1720 GLC(context_, | 1742 GLC(context_, |
1721 context_->drawElements(GL_TRIANGLES, | 1743 context_->drawElements(GL_TRIANGLES, |
1722 6 * draw_cache_.matrix_data.size(), | 1744 6 * draw_cache_.matrix_data.size(), |
1723 GL_UNSIGNED_SHORT, | 1745 GL_UNSIGNED_SHORT, |
1724 0)); | 1746 0)); |
1725 | 1747 |
1726 // Clear the cache. | 1748 // Clear the cache. |
1727 draw_cache_.program_id = 0; | 1749 draw_cache_.program_id = 0; |
1728 draw_cache_.uv_xform_data.resize(0); | 1750 draw_cache_.uv_xform_data.resize(0); |
1729 draw_cache_.vertex_opacity_data.resize(0); | 1751 draw_cache_.vertex_opacity_data.resize(0); |
1730 draw_cache_.matrix_data.resize(0); | 1752 draw_cache_.matrix_data.resize(0); |
1731 } | 1753 } |
1732 | 1754 |
1733 void GLRenderer::EnqueueTextureQuad(const DrawingFrame* frame, | 1755 void GLRenderer::EnqueueTextureQuad(const DrawingFrame* frame, |
1734 const TextureDrawQuad* quad) { | 1756 const TextureDrawQuad* quad) { |
1735 TexCoordPrecision tex_coord_precision = TexCoordPrecisionRequired( | 1757 TexCoordPrecision tex_coord_precision = TexCoordPrecisionRequired( |
1736 context_, &highp_threshold_cache_, highp_threshold_min_, | 1758 context_, &highp_threshold_cache_, highp_threshold_min_, |
1737 quad->shared_quad_state->visible_content_rect.bottom_right()); | 1759 quad->shared_quad_state->visible_content_rect.bottom_right()); |
1738 | 1760 |
1739 // Choose the correct texture program binding | 1761 // Choose the correct texture program binding |
1740 TexTransformTextureProgramBinding binding; | 1762 TexTransformTextureProgramBinding binding; |
1741 if (quad->premultiplied_alpha) { | 1763 if (quad->premultiplied_alpha) { |
1742 binding.Set(GetTextureProgram(tex_coord_precision), Context()); | 1764 if (quad->background_color == SK_ColorTRANSPARENT) { |
1765 binding.Set(GetTextureProgram(tex_coord_precision), Context()); | |
1766 } else { | |
1767 binding.Set(GetTextureBackgroundProgram(tex_coord_precision), Context()); | |
1768 } | |
1743 } else { | 1769 } else { |
1744 binding.Set(GetNonPremultipliedTextureProgram(tex_coord_precision), | 1770 if (quad->background_color == SK_ColorTRANSPARENT) { |
1745 Context()); | 1771 binding.Set(GetNonPremultipliedTextureProgram(tex_coord_precision), |
1772 Context()); | |
1773 } else { | |
1774 binding.Set( | |
1775 GetNonPremultipliedTextureBackgroundProgram(tex_coord_precision), | |
1776 Context()); | |
1777 } | |
1746 } | 1778 } |
1747 | 1779 |
1748 int resource_id = quad->resource_id; | 1780 int resource_id = quad->resource_id; |
1749 | 1781 |
1750 if (draw_cache_.program_id != binding.program_id || | 1782 if (draw_cache_.program_id != binding.program_id || |
1751 draw_cache_.resource_id != resource_id || | 1783 draw_cache_.resource_id != resource_id || |
1752 draw_cache_.needs_blending != quad->ShouldDrawWithBlending() || | 1784 draw_cache_.needs_blending != quad->ShouldDrawWithBlending() || |
1785 draw_cache_.background_color != quad->background_color || | |
1753 draw_cache_.matrix_data.size() >= 8) { | 1786 draw_cache_.matrix_data.size() >= 8) { |
1754 FlushTextureQuadCache(); | 1787 FlushTextureQuadCache(); |
1755 draw_cache_.program_id = binding.program_id; | 1788 draw_cache_.program_id = binding.program_id; |
1756 draw_cache_.resource_id = resource_id; | 1789 draw_cache_.resource_id = resource_id; |
1757 draw_cache_.needs_blending = quad->ShouldDrawWithBlending(); | 1790 draw_cache_.needs_blending = quad->ShouldDrawWithBlending(); |
1791 draw_cache_.background_color = quad->background_color; | |
1758 | 1792 |
1759 draw_cache_.uv_xform_location = binding.tex_transform_location; | 1793 draw_cache_.uv_xform_location = binding.tex_transform_location; |
1794 draw_cache_.background_color_location = binding.background_color_location; | |
1760 draw_cache_.vertex_opacity_location = binding.vertex_opacity_location; | 1795 draw_cache_.vertex_opacity_location = binding.vertex_opacity_location; |
1761 draw_cache_.matrix_location = binding.matrix_location; | 1796 draw_cache_.matrix_location = binding.matrix_location; |
1762 draw_cache_.sampler_location = binding.sampler_location; | 1797 draw_cache_.sampler_location = binding.sampler_location; |
1763 } | 1798 } |
1764 | 1799 |
1765 // Generate the uv-transform | 1800 // Generate the uv-transform |
1766 draw_cache_.uv_xform_data.push_back(UVTransform(quad)); | 1801 draw_cache_.uv_xform_data.push_back(UVTransform(quad)); |
1767 | 1802 |
1768 // Generate the vertex opacity | 1803 // Generate the vertex opacity |
1769 const float opacity = quad->opacity(); | 1804 const float opacity = quad->opacity(); |
1770 draw_cache_.vertex_opacity_data.push_back(quad->vertex_opacity[0] * opacity); | 1805 draw_cache_.vertex_opacity_data.push_back(quad->vertex_opacity[0] * opacity); |
1771 draw_cache_.vertex_opacity_data.push_back(quad->vertex_opacity[1] * opacity); | 1806 draw_cache_.vertex_opacity_data.push_back(quad->vertex_opacity[1] * opacity); |
1772 draw_cache_.vertex_opacity_data.push_back(quad->vertex_opacity[2] * opacity); | 1807 draw_cache_.vertex_opacity_data.push_back(quad->vertex_opacity[2] * opacity); |
1773 draw_cache_.vertex_opacity_data.push_back(quad->vertex_opacity[3] * opacity); | 1808 draw_cache_.vertex_opacity_data.push_back(quad->vertex_opacity[3] * opacity); |
1774 | 1809 |
1775 // Generate the transform matrix | 1810 // Generate the transform matrix |
1776 gfx::Transform quad_rect_matrix; | 1811 gfx::Transform quad_rect_matrix; |
1777 QuadRectTransform(&quad_rect_matrix, quad->quadTransform(), quad->rect); | 1812 QuadRectTransform(&quad_rect_matrix, quad->quadTransform(), quad->rect); |
1778 quad_rect_matrix = frame->projection_matrix * quad_rect_matrix; | 1813 quad_rect_matrix = frame->projection_matrix * quad_rect_matrix; |
1779 | 1814 |
1780 Float16 m; | 1815 Float16 m; |
1781 quad_rect_matrix.matrix().asColMajorf(m.data); | 1816 quad_rect_matrix.matrix().asColMajorf(m.data); |
1782 draw_cache_.matrix_data.push_back(m); | 1817 draw_cache_.matrix_data.push_back(m); |
1783 } | 1818 } |
1784 | 1819 |
1785 void GLRenderer::DrawTextureQuad(const DrawingFrame* frame, | 1820 void GLRenderer::DrawTextureQuad(const DrawingFrame* frame, |
1786 const TextureDrawQuad* quad) { | 1821 const TextureDrawQuad* quad) { |
piman
2013/07/03 20:11:12
FYI this method was removed by https://codereview.
alokp
2013/07/09 00:08:06
Thanks for the heads up.
| |
1787 TexCoordPrecision tex_coord_precision = TexCoordPrecisionRequired( | 1822 TexCoordPrecision tex_coord_precision = TexCoordPrecisionRequired( |
1788 context_, &highp_threshold_cache_, highp_threshold_min_, | 1823 context_, &highp_threshold_cache_, highp_threshold_min_, |
1789 quad->shared_quad_state->visible_content_rect.bottom_right()); | 1824 quad->shared_quad_state->visible_content_rect.bottom_right()); |
1790 | 1825 |
1791 TexTransformTextureProgramBinding binding; | 1826 TexTransformTextureProgramBinding binding; |
1792 if (quad->premultiplied_alpha) { | 1827 if (quad->premultiplied_alpha) { |
1793 binding.Set(GetTextureProgram(tex_coord_precision), Context()); | 1828 if (quad->background_color == SK_ColorTRANSPARENT) { |
1829 binding.Set(GetTextureProgram(tex_coord_precision), Context()); | |
1830 } else { | |
1831 binding.Set(GetTextureBackgroundProgram(tex_coord_precision), Context()); | |
1832 } | |
1794 } else { | 1833 } else { |
1795 binding.Set(GetNonPremultipliedTextureProgram(tex_coord_precision), | 1834 if (quad->background_color == SK_ColorTRANSPARENT) { |
1796 Context()); | 1835 binding.Set(GetNonPremultipliedTextureProgram(tex_coord_precision), |
1836 Context()); | |
1837 } else { | |
1838 binding.Set( | |
1839 GetNonPremultipliedTextureBackgroundProgram(tex_coord_precision), | |
1840 Context()); | |
1841 } | |
1797 } | 1842 } |
1798 SetUseProgram(binding.program_id); | 1843 SetUseProgram(binding.program_id); |
1799 GLC(Context(), Context()->uniform1i(binding.sampler_location, 0)); | 1844 GLC(Context(), Context()->uniform1i(binding.sampler_location, 0)); |
1800 Float4 uv_xform = UVTransform(quad); | 1845 Float4 uv_xform = UVTransform(quad); |
1801 GLC(Context(), | 1846 GLC(Context(), |
1802 Context()->uniform4f(binding.tex_transform_location, | 1847 Context()->uniform4f(binding.tex_transform_location, |
1803 uv_xform.data[0], | 1848 uv_xform.data[0], |
1804 uv_xform.data[1], | 1849 uv_xform.data[1], |
1805 uv_xform.data[2], | 1850 uv_xform.data[2], |
1806 uv_xform.data[3])); | 1851 uv_xform.data[3])); |
1807 | 1852 |
1853 if (quad->background_color != SK_ColorTRANSPARENT) { | |
1854 Float4 background_color = PremultipliedColor(quad->background_color); | |
1855 GLC(Context(), | |
1856 Context()->uniform4fv( | |
1857 binding.background_color_location, 1, background_color.data)); | |
1858 } | |
1859 | |
1808 GLC(Context(), | 1860 GLC(Context(), |
1809 Context()->uniform1fv( | 1861 Context()->uniform1fv( |
1810 binding.vertex_opacity_location, 4, quad->vertex_opacity)); | 1862 binding.vertex_opacity_location, 4, quad->vertex_opacity)); |
1811 | 1863 |
1812 ResourceProvider::ScopedSamplerGL quad_resource_lock( | 1864 ResourceProvider::ScopedSamplerGL quad_resource_lock( |
1813 resource_provider_, quad->resource_id, GL_TEXTURE_2D, GL_LINEAR); | 1865 resource_provider_, quad->resource_id, GL_TEXTURE_2D, GL_LINEAR); |
1814 | 1866 |
1815 DrawQuadGeometry( | 1867 DrawQuadGeometry( |
1816 frame, quad->quadTransform(), quad->rect, binding.matrix_location); | 1868 frame, quad->quadTransform(), quad->rect, binding.matrix_location); |
1817 } | 1869 } |
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2775 new NonPremultipliedTextureProgram(context_, precision)); | 2827 new NonPremultipliedTextureProgram(context_, precision)); |
2776 } | 2828 } |
2777 if (!program->initialized()) { | 2829 if (!program->initialized()) { |
2778 TRACE_EVENT0("cc", | 2830 TRACE_EVENT0("cc", |
2779 "GLRenderer::NonPremultipliedTextureProgram::Initialize"); | 2831 "GLRenderer::NonPremultipliedTextureProgram::Initialize"); |
2780 program->Initialize(context_, is_using_bind_uniform_); | 2832 program->Initialize(context_, is_using_bind_uniform_); |
2781 } | 2833 } |
2782 return program.get(); | 2834 return program.get(); |
2783 } | 2835 } |
2784 | 2836 |
2837 const GLRenderer::TextureBackgroundProgram* | |
2838 GLRenderer::GetTextureBackgroundProgram(TexCoordPrecision precision) { | |
2839 scoped_ptr<TextureBackgroundProgram>& program = | |
2840 (precision == TexCoordPrecisionHigh) ? texture_background_program_highp_ | |
2841 : texture_background_program_; | |
2842 if (!program) | |
2843 program = make_scoped_ptr( | |
2844 new TextureBackgroundProgram(context_, precision)); | |
2845 if (!program->initialized()) { | |
2846 TRACE_EVENT0("cc", "GLRenderer::textureProgram::initialize"); | |
2847 program->Initialize(context_, is_using_bind_uniform_); | |
2848 } | |
2849 return program.get(); | |
2850 } | |
2851 | |
2852 const GLRenderer::NonPremultipliedTextureBackgroundProgram* | |
2853 GLRenderer::GetNonPremultipliedTextureBackgroundProgram( | |
2854 TexCoordPrecision precision) { | |
2855 scoped_ptr<NonPremultipliedTextureBackgroundProgram>& program = | |
2856 (precision == TexCoordPrecisionHigh) ? | |
2857 nonpremultiplied_texture_background_program_highp_ : | |
2858 nonpremultiplied_texture_background_program_; | |
2859 if (!program) { | |
2860 program = make_scoped_ptr( | |
2861 new NonPremultipliedTextureBackgroundProgram(context_, precision)); | |
2862 } | |
2863 if (!program->initialized()) { | |
2864 TRACE_EVENT0("cc", | |
2865 "GLRenderer::NonPremultipliedTextureProgram::Initialize"); | |
2866 program->Initialize(context_, is_using_bind_uniform_); | |
2867 } | |
2868 return program.get(); | |
2869 } | |
2870 | |
2785 const GLRenderer::TextureIOSurfaceProgram* | 2871 const GLRenderer::TextureIOSurfaceProgram* |
2786 GLRenderer::GetTextureIOSurfaceProgram(TexCoordPrecision precision) { | 2872 GLRenderer::GetTextureIOSurfaceProgram(TexCoordPrecision precision) { |
2787 scoped_ptr<TextureIOSurfaceProgram>& program = | 2873 scoped_ptr<TextureIOSurfaceProgram>& program = |
2788 (precision == TexCoordPrecisionHigh) ? texture_io_surface_program_highp_ | 2874 (precision == TexCoordPrecisionHigh) ? texture_io_surface_program_highp_ |
2789 : texture_io_surface_program_; | 2875 : texture_io_surface_program_; |
2790 if (!program) | 2876 if (!program) |
2791 program = | 2877 program = |
2792 make_scoped_ptr(new TextureIOSurfaceProgram(context_, precision)); | 2878 make_scoped_ptr(new TextureIOSurfaceProgram(context_, precision)); |
2793 if (!program->initialized()) { | 2879 if (!program->initialized()) { |
2794 TRACE_EVENT0("cc", "GLRenderer::textureIOSurfaceProgram::initialize"); | 2880 TRACE_EVENT0("cc", "GLRenderer::textureIOSurfaceProgram::initialize"); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2906 render_pass_mask_color_matrix_program_aa_highp_->Cleanup(context_); | 2992 render_pass_mask_color_matrix_program_aa_highp_->Cleanup(context_); |
2907 if (render_pass_color_matrix_program_aa_highp_) | 2993 if (render_pass_color_matrix_program_aa_highp_) |
2908 render_pass_color_matrix_program_aa_highp_->Cleanup(context_); | 2994 render_pass_color_matrix_program_aa_highp_->Cleanup(context_); |
2909 if (render_pass_mask_color_matrix_program_highp_) | 2995 if (render_pass_mask_color_matrix_program_highp_) |
2910 render_pass_mask_color_matrix_program_highp_->Cleanup(context_); | 2996 render_pass_mask_color_matrix_program_highp_->Cleanup(context_); |
2911 | 2997 |
2912 if (texture_program_) | 2998 if (texture_program_) |
2913 texture_program_->Cleanup(context_); | 2999 texture_program_->Cleanup(context_); |
2914 if (nonpremultiplied_texture_program_) | 3000 if (nonpremultiplied_texture_program_) |
2915 nonpremultiplied_texture_program_->Cleanup(context_); | 3001 nonpremultiplied_texture_program_->Cleanup(context_); |
3002 if (texture_background_program_) | |
3003 texture_background_program_->Cleanup(context_); | |
3004 if (nonpremultiplied_texture_background_program_) | |
3005 nonpremultiplied_texture_background_program_->Cleanup(context_); | |
2916 if (texture_io_surface_program_) | 3006 if (texture_io_surface_program_) |
2917 texture_io_surface_program_->Cleanup(context_); | 3007 texture_io_surface_program_->Cleanup(context_); |
2918 | 3008 |
2919 if (texture_program_highp_) | 3009 if (texture_program_highp_) |
2920 texture_program_highp_->Cleanup(context_); | 3010 texture_program_highp_->Cleanup(context_); |
2921 if (nonpremultiplied_texture_program_highp_) | 3011 if (nonpremultiplied_texture_program_highp_) |
2922 nonpremultiplied_texture_program_highp_->Cleanup(context_); | 3012 nonpremultiplied_texture_program_highp_->Cleanup(context_); |
3013 if (texture_background_program_highp_) | |
3014 texture_background_program_highp_->Cleanup(context_); | |
3015 if (nonpremultiplied_texture_background_program_highp_) | |
3016 nonpremultiplied_texture_background_program_highp_->Cleanup(context_); | |
2923 if (texture_io_surface_program_highp_) | 3017 if (texture_io_surface_program_highp_) |
2924 texture_io_surface_program_highp_->Cleanup(context_); | 3018 texture_io_surface_program_highp_->Cleanup(context_); |
2925 | 3019 |
2926 if (video_yuv_program_) | 3020 if (video_yuv_program_) |
2927 video_yuv_program_->Cleanup(context_); | 3021 video_yuv_program_->Cleanup(context_); |
2928 if (video_yuva_program_) | 3022 if (video_yuva_program_) |
2929 video_yuva_program_->Cleanup(context_); | 3023 video_yuva_program_->Cleanup(context_); |
2930 if (video_stream_texture_program_) | 3024 if (video_stream_texture_program_) |
2931 video_stream_texture_program_->Cleanup(context_); | 3025 video_stream_texture_program_->Cleanup(context_); |
2932 | 3026 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3009 std::string unique_context_name = base::StringPrintf( | 3103 std::string unique_context_name = base::StringPrintf( |
3010 "%s-Offscreen-%p", | 3104 "%s-Offscreen-%p", |
3011 Settings().compositor_name.c_str(), | 3105 Settings().compositor_name.c_str(), |
3012 context_); | 3106 context_); |
3013 resource_provider()->offscreen_context_provider()->Context3d()-> | 3107 resource_provider()->offscreen_context_provider()->Context3d()-> |
3014 pushGroupMarkerEXT(unique_context_name.c_str()); | 3108 pushGroupMarkerEXT(unique_context_name.c_str()); |
3015 } | 3109 } |
3016 | 3110 |
3017 | 3111 |
3018 } // namespace cc | 3112 } // namespace cc |
OLD | NEW |