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

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

Issue 22900018: cc: Set the mapped memory reclaim limit for the renderer compositor on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move max_transfer_buffer_usage_bytes to OutputSurface::Capabilities Created 7 years, 3 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 | « no previous file | cc/output/output_surface.h » ('j') | cc/output/output_surface.h » ('J')
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 <set> 7 #include <set>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/debug/test_web_graphics_context_3d.h" 10 #include "cc/debug/test_web_graphics_context_3d.h"
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 "GL_CHROMIUM_post_sub_buffer GL_CHROMIUM_discard_backbuffer"); 1474 "GL_CHROMIUM_post_sub_buffer GL_CHROMIUM_discard_backbuffer");
1475 return WebString(); 1475 return WebString();
1476 } 1476 }
1477 }; 1477 };
1478 1478
1479 class MockOutputSurface : public OutputSurface { 1479 class MockOutputSurface : public OutputSurface {
1480 public: 1480 public:
1481 MockOutputSurface() 1481 MockOutputSurface()
1482 : OutputSurface(TestContextProvider::Create( 1482 : OutputSurface(TestContextProvider::Create(
1483 scoped_ptr<TestWebGraphicsContext3D>( 1483 scoped_ptr<TestWebGraphicsContext3D>(
1484 new StrictMock<OutputSurfaceMockContext>))) { 1484 new StrictMock<OutputSurfaceMockContext>)),
1485 OutputSurface::kDefaultMaxTransferBufferUsageBytes) {
1485 surface_size_ = gfx::Size(100, 100); 1486 surface_size_ = gfx::Size(100, 100);
1486 } 1487 }
1487 virtual ~MockOutputSurface() {} 1488 virtual ~MockOutputSurface() {}
1488 1489
1489 MOCK_METHOD0(EnsureBackbuffer, void()); 1490 MOCK_METHOD0(EnsureBackbuffer, void());
1490 MOCK_METHOD0(DiscardBackbuffer, void()); 1491 MOCK_METHOD0(DiscardBackbuffer, void());
1491 MOCK_METHOD2(Reshape, void(gfx::Size size, float scale_factor)); 1492 MOCK_METHOD2(Reshape, void(gfx::Size size, float scale_factor));
1492 MOCK_METHOD0(BindFramebuffer, void()); 1493 MOCK_METHOD0(BindFramebuffer, void());
1493 MOCK_METHOD1(SwapBuffers, void(CompositorFrame* frame)); 1494 MOCK_METHOD1(SwapBuffers, void(CompositorFrame* frame));
1494 }; 1495 };
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 base::MessageLoop::current()->Run(); 1643 base::MessageLoop::current()->Run();
1643 1644
1644 // The sync point should have happened. 1645 // The sync point should have happened.
1645 EXPECT_EQ(1, sync_point_callback_count); 1646 EXPECT_EQ(1, sync_point_callback_count);
1646 EXPECT_EQ(1, other_callback_count); 1647 EXPECT_EQ(1, other_callback_count);
1647 } 1648 }
1648 #endif // OS_ANDROID 1649 #endif // OS_ANDROID
1649 1650
1650 } // namespace 1651 } // namespace
1651 } // namespace cc 1652 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/output_surface.h » ('j') | cc/output/output_surface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698