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

Side by Side Diff: cc/output/gl_renderer_unittest.cc

Issue 2776923003: cc: Partial draw without partial swap support. (Closed)
Patch Set: avoid BufferQueue::RecreateBuffer changes Created 3 years, 8 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 | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface.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 // 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 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 MOCK_METHOD0(GetFramebufferCopyTextureFormat, GLenum()); 1630 MOCK_METHOD0(GetFramebufferCopyTextureFormat, GLenum());
1631 MOCK_METHOD1(SwapBuffers_, void(OutputSurfaceFrame& frame)); // NOLINT 1631 MOCK_METHOD1(SwapBuffers_, void(OutputSurfaceFrame& frame)); // NOLINT
1632 void SwapBuffers(OutputSurfaceFrame frame) override { SwapBuffers_(frame); } 1632 void SwapBuffers(OutputSurfaceFrame frame) override { SwapBuffers_(frame); }
1633 MOCK_CONST_METHOD0(GetOverlayCandidateValidator, 1633 MOCK_CONST_METHOD0(GetOverlayCandidateValidator,
1634 OverlayCandidateValidator*()); 1634 OverlayCandidateValidator*());
1635 MOCK_CONST_METHOD0(IsDisplayedAsOverlayPlane, bool()); 1635 MOCK_CONST_METHOD0(IsDisplayedAsOverlayPlane, bool());
1636 MOCK_CONST_METHOD0(GetOverlayTextureId, unsigned()); 1636 MOCK_CONST_METHOD0(GetOverlayTextureId, unsigned());
1637 MOCK_CONST_METHOD0(SurfaceIsSuspendForRecycle, bool()); 1637 MOCK_CONST_METHOD0(SurfaceIsSuspendForRecycle, bool());
1638 MOCK_CONST_METHOD0(HasExternalStencilTest, bool()); 1638 MOCK_CONST_METHOD0(HasExternalStencilTest, bool());
1639 MOCK_METHOD0(ApplyExternalStencil, void()); 1639 MOCK_METHOD0(ApplyExternalStencil, void());
1640 MOCK_METHOD1(CanPartialDraw, bool(const gfx::Rect&));
1640 }; 1641 };
1641 1642
1642 class MockOutputSurfaceTest : public GLRendererTest { 1643 class MockOutputSurfaceTest : public GLRendererTest {
1643 protected: 1644 protected:
1644 void SetUp() override { 1645 void SetUp() override {
1645 auto context = base::MakeUnique<StrictMock<OutputSurfaceMockContext>>(); 1646 auto context = base::MakeUnique<StrictMock<OutputSurfaceMockContext>>();
1646 context_ = context.get(); 1647 context_ = context.get();
1647 auto provider = TestContextProvider::Create(std::move(context)); 1648 auto provider = TestContextProvider::Create(std::move(context));
1648 provider->BindToCurrentThread(); 1649 provider->BindToCurrentThread();
1649 output_surface_ = 1650 output_surface_ =
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2351 2352
2352 TEST_F(GLRendererSwapWithBoundsTest, NonEmpty) { 2353 TEST_F(GLRendererSwapWithBoundsTest, NonEmpty) {
2353 std::vector<gfx::Rect> content_bounds; 2354 std::vector<gfx::Rect> content_bounds;
2354 content_bounds.push_back(gfx::Rect(0, 0, 10, 10)); 2355 content_bounds.push_back(gfx::Rect(0, 0, 10, 10));
2355 content_bounds.push_back(gfx::Rect(20, 20, 30, 30)); 2356 content_bounds.push_back(gfx::Rect(20, 20, 30, 30));
2356 RunTest(content_bounds); 2357 RunTest(content_bounds);
2357 } 2358 }
2358 2359
2359 } // namespace 2360 } // namespace
2360 } // namespace cc 2361 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698