| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1901 gfx::Rect(viewport_size), gfx::Transform()); | 1901 gfx::Rect(viewport_size), gfx::Transform()); |
| 1902 AddQuad(root_pass, gfx::Rect(viewport_size), SK_ColorGREEN); | 1902 AddQuad(root_pass, gfx::Rect(viewport_size), SK_ColorGREEN); |
| 1903 | 1903 |
| 1904 testing::Sequence seq; | 1904 testing::Sequence seq; |
| 1905 // A bunch of initialization that happens. | 1905 // A bunch of initialization that happens. |
| 1906 EXPECT_CALL(*gl, Disable(GL_DEPTH_TEST)).InSequence(seq); | 1906 EXPECT_CALL(*gl, Disable(GL_DEPTH_TEST)).InSequence(seq); |
| 1907 EXPECT_CALL(*gl, Disable(GL_CULL_FACE)).InSequence(seq); | 1907 EXPECT_CALL(*gl, Disable(GL_CULL_FACE)).InSequence(seq); |
| 1908 EXPECT_CALL(*gl, Disable(GL_STENCIL_TEST)).InSequence(seq); | 1908 EXPECT_CALL(*gl, Disable(GL_STENCIL_TEST)).InSequence(seq); |
| 1909 EXPECT_CALL(*gl, Enable(GL_BLEND)).InSequence(seq); | 1909 EXPECT_CALL(*gl, Enable(GL_BLEND)).InSequence(seq); |
| 1910 EXPECT_CALL(*gl, Disable(GL_SCISSOR_TEST)).InSequence(seq); | 1910 EXPECT_CALL(*gl, Disable(GL_SCISSOR_TEST)).InSequence(seq); |
| 1911 EXPECT_CALL(*gl, Scissor(0, 0, 0, 0)).InSequence(seq); |
| 1911 | 1912 |
| 1912 // Partial frame, we should use a scissor to swap only that part when | 1913 // Partial frame, we should use a scissor to swap only that part when |
| 1913 // partial swap is enabled. | 1914 // partial swap is enabled. |
| 1914 root_pass->damage_rect = gfx::Rect(2, 2, 3, 3); | 1915 root_pass->damage_rect = gfx::Rect(2, 2, 3, 3); |
| 1915 | 1916 |
| 1916 if (partial_swap) { | 1917 if (partial_swap) { |
| 1917 EXPECT_CALL(*gl, Enable(GL_SCISSOR_TEST)).InSequence(seq); | 1918 EXPECT_CALL(*gl, Enable(GL_SCISSOR_TEST)).InSequence(seq); |
| 1918 // The scissor is flipped, so subtract the y coord and height from the | 1919 // The scissor is flipped, so subtract the y coord and height from the |
| 1919 // bottom of the GL viewport. | 1920 // bottom of the GL viewport. |
| 1920 EXPECT_CALL(*gl, Scissor(2, viewport_size.height() - 3 - 2, 3, 3)) | 1921 EXPECT_CALL(*gl, Scissor(2, viewport_size.height() - 3 - 2, 3, 3)) |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1981 renderer_->SetVisible(true); | 1982 renderer_->SetVisible(true); |
| 1982 Mock::VerifyAndClearExpectations(context_support_ptr_); | 1983 Mock::VerifyAndClearExpectations(context_support_ptr_); |
| 1983 | 1984 |
| 1984 EXPECT_CALL(*context_support_ptr_, SetAggressivelyFreeResources(true)); | 1985 EXPECT_CALL(*context_support_ptr_, SetAggressivelyFreeResources(true)); |
| 1985 renderer_->SetVisible(false); | 1986 renderer_->SetVisible(false); |
| 1986 Mock::VerifyAndClearExpectations(context_support_ptr_); | 1987 Mock::VerifyAndClearExpectations(context_support_ptr_); |
| 1987 } | 1988 } |
| 1988 | 1989 |
| 1989 } // namespace | 1990 } // namespace |
| 1990 } // namespace cc | 1991 } // namespace cc |
| OLD | NEW |