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

Side by Side Diff: cc/test/pixel_test.h

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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/test/layer_tree_test.cc ('k') | cc/test/pixel_test.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/files/file_util.h" 5 #include "base/files/file_util.h"
6 #include "cc/output/gl_renderer.h" 6 #include "cc/output/gl_renderer.h"
7 #include "cc/output/software_renderer.h" 7 #include "cc/output/software_renderer.h"
8 #include "cc/quads/render_pass.h" 8 #include "cc/quads/render_pass.h"
9 #include "cc/test/pixel_comparator.h" 9 #include "cc/test/pixel_comparator.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "ui/gfx/size.h" 11 #include "ui/gfx/size.h"
12 #include "ui/gl/gl_implementation.h" 12 #include "ui/gl/gl_implementation.h"
13 13
14 #ifndef CC_TEST_PIXEL_TEST_H_ 14 #ifndef CC_TEST_PIXEL_TEST_H_
15 #define CC_TEST_PIXEL_TEST_H_ 15 #define CC_TEST_PIXEL_TEST_H_
16 16
17 namespace cc { 17 namespace cc {
18 class CopyOutputResult; 18 class CopyOutputResult;
19 class DirectRenderer; 19 class DirectRenderer;
20 class FakeOutputSurfaceClient; 20 class FakeOutputSurfaceClient;
21 class OutputSurface; 21 class OutputSurface;
22 class ResourceProvider; 22 class ResourceProvider;
23 class SoftwareRenderer; 23 class SoftwareRenderer;
24 class SharedBitmapManager; 24 class TestGpuMemoryBufferManager;
25 class TestSharedBitmapManager;
25 26
26 class PixelTest : public testing::Test, RendererClient { 27 class PixelTest : public testing::Test, RendererClient {
27 protected: 28 protected:
28 PixelTest(); 29 PixelTest();
29 virtual ~PixelTest(); 30 virtual ~PixelTest();
30 31
31 bool RunPixelTest(RenderPassList* pass_list, 32 bool RunPixelTest(RenderPassList* pass_list,
32 const base::FilePath& ref_file, 33 const base::FilePath& ref_file,
33 const PixelComparator& comparator); 34 const PixelComparator& comparator);
34 35
35 bool RunPixelTestWithReadbackTarget( 36 bool RunPixelTestWithReadbackTarget(
36 RenderPassList* pass_list, 37 RenderPassList* pass_list,
37 RenderPass* target, 38 RenderPass* target,
38 const base::FilePath& ref_file, 39 const base::FilePath& ref_file,
39 const PixelComparator& comparator); 40 const PixelComparator& comparator);
40 41
41 LayerTreeSettings settings_; 42 LayerTreeSettings settings_;
42 gfx::Size device_viewport_size_; 43 gfx::Size device_viewport_size_;
43 bool disable_picture_quad_image_filtering_; 44 bool disable_picture_quad_image_filtering_;
44 class PixelTestRendererClient; 45 class PixelTestRendererClient;
45 scoped_ptr<FakeOutputSurfaceClient> output_surface_client_; 46 scoped_ptr<FakeOutputSurfaceClient> output_surface_client_;
46 scoped_ptr<OutputSurface> output_surface_; 47 scoped_ptr<OutputSurface> output_surface_;
47 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; 48 scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
49 scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
48 scoped_ptr<BlockingTaskRunner> main_thread_task_runner_; 50 scoped_ptr<BlockingTaskRunner> main_thread_task_runner_;
49 scoped_ptr<ResourceProvider> resource_provider_; 51 scoped_ptr<ResourceProvider> resource_provider_;
50 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; 52 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
51 scoped_ptr<DirectRenderer> renderer_; 53 scoped_ptr<DirectRenderer> renderer_;
52 scoped_ptr<SkBitmap> result_bitmap_; 54 scoped_ptr<SkBitmap> result_bitmap_;
53 gfx::Vector2d external_device_viewport_offset_; 55 gfx::Vector2d external_device_viewport_offset_;
54 gfx::Rect external_device_clip_rect_; 56 gfx::Rect external_device_clip_rect_;
55 57
56 void SetUpGLRenderer(bool use_skia_gpu_backend); 58 void SetUpGLRenderer(bool use_skia_gpu_backend);
57 void SetUpSoftwareRenderer(); 59 void SetUpSoftwareRenderer();
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 SoftwareRendererWithExpandedViewport>::ExpandedViewport() const { 184 SoftwareRendererWithExpandedViewport>::ExpandedViewport() const {
183 return true; 185 return true;
184 } 186 }
185 187
186 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; 188 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest;
187 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; 189 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest;
188 190
189 } // namespace cc 191 } // namespace cc
190 192
191 #endif // CC_TEST_PIXEL_TEST_H_ 193 #endif // CC_TEST_PIXEL_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698