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

Side by Side Diff: cc/gl_renderer_unittest.cc

Issue 11369109: cc: Rename PrioritizedTexture to PrioritizedResource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/image_layer_updater.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 "config.h" 5 #include "config.h"
6 #include "cc/gl_renderer.h" 6 #include "cc/gl_renderer.h"
7 7
8 #include "cc/draw_quad.h" 8 #include "cc/draw_quad.h"
9 #include "cc/prioritized_texture_manager.h" 9 #include "cc/prioritized_resource_manager.h"
10 #include "cc/resource_provider.h" 10 #include "cc/resource_provider.h"
11 #include "cc/settings.h" 11 #include "cc/settings.h"
12 #include "cc/single_thread_proxy.h" 12 #include "cc/single_thread_proxy.h"
13 #include "cc/test/fake_web_compositor_output_surface.h" 13 #include "cc/test/fake_web_compositor_output_surface.h"
14 #include "cc/test/fake_web_graphics_context_3d.h" 14 #include "cc/test/fake_web_graphics_context_3d.h"
15 #include "cc/test/test_common.h" 15 #include "cc/test/test_common.h"
16 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "third_party/khronos/GLES2/gl2.h" 18 #include "third_party/khronos/GLES2/gl2.h"
19 #include <public/WebTransformationMatrix.h> 19 #include <public/WebTransformationMatrix.h>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 int m_frame; 54 int m_frame;
55 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* m_memoryAllocationChange dCallback; 55 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* m_memoryAllocationChange dCallback;
56 }; 56 };
57 57
58 class FakeRendererClient : public RendererClient { 58 class FakeRendererClient : public RendererClient {
59 public: 59 public:
60 FakeRendererClient() 60 FakeRendererClient()
61 : m_setFullRootLayerDamageCount(0) 61 : m_setFullRootLayerDamageCount(0)
62 , m_lastCallWasSetVisibility(0) 62 , m_lastCallWasSetVisibility(0)
63 , m_rootLayer(LayerImpl::create(1)) 63 , m_rootLayer(LayerImpl::create(1))
64 , m_memoryAllocationLimitBytes(PrioritizedTextureManager::defaultMemoryA llocationLimit()) 64 , m_memoryAllocationLimitBytes(PrioritizedResourceManager::defaultMemory AllocationLimit())
65 { 65 {
66 m_rootLayer->createRenderSurface(); 66 m_rootLayer->createRenderSurface();
67 RenderPass::Id renderPassId = m_rootLayer->renderSurface()->renderPassId (); 67 RenderPass::Id renderPassId = m_rootLayer->renderSurface()->renderPassId ();
68 scoped_ptr<RenderPass> rootRenderPass = RenderPass::create(renderPassId, gfx::Rect(), WebTransformationMatrix()); 68 scoped_ptr<RenderPass> rootRenderPass = RenderPass::create(renderPassId, gfx::Rect(), WebTransformationMatrix());
69 m_renderPassesInDrawOrder.push_back(rootRenderPass.get()); 69 m_renderPassesInDrawOrder.push_back(rootRenderPass.get());
70 m_renderPasses.set(renderPassId, rootRenderPass.Pass()); 70 m_renderPasses.set(renderPassId, rootRenderPass.Pass());
71 } 71 }
72 72
73 // RendererClient methods. 73 // RendererClient methods.
74 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { static gfx::S ize fakeSize(1, 1); return fakeSize; } 74 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { static gfx::S ize fakeSize(1, 1); return fakeSize; }
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // them both a pointer to a variable on the stack. 480 // them both a pointer to a variable on the stack.
481 context->setLastCallWasSetVisibilityPointer(&lastCallWasSetVisiblity); 481 context->setLastCallWasSetVisibilityPointer(&lastCallWasSetVisiblity);
482 mockClient.setLastCallWasSetVisibilityPointer(&lastCallWasSetVisiblity); 482 mockClient.setLastCallWasSetVisibilityPointer(&lastCallWasSetVisiblity);
483 renderer.setVisible(true); 483 renderer.setVisible(true);
484 renderer.drawFrame(mockClient.renderPassesInDrawOrder(), mockClient.renderPa sses()); 484 renderer.drawFrame(mockClient.renderPassesInDrawOrder(), mockClient.renderPa sses());
485 renderer.setVisible(false); 485 renderer.setVisible(false);
486 EXPECT_TRUE(lastCallWasSetVisiblity); 486 EXPECT_TRUE(lastCallWasSetVisiblity);
487 } 487 }
488 488
489 } // anonymous namespace 489 } // anonymous namespace
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/image_layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698