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

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

Issue 1579633003: cc: Avoid crash on Android in GLRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 4 years, 11 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') | no next file » | 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 <set> 7 #include <set>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 void TestBasicShaders() { 125 void TestBasicShaders() {
126 EXPECT_PROGRAM_VALID(renderer()->GetDebugBorderProgram()); 126 EXPECT_PROGRAM_VALID(renderer()->GetDebugBorderProgram());
127 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgram()); 127 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgram());
128 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgramAA()); 128 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgramAA());
129 } 129 }
130 130
131 void TestShadersWithPrecision(TexCoordPrecision precision) { 131 void TestShadersWithPrecision(TexCoordPrecision precision) {
132 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision)); 132 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision));
133 // This program uses external textures and sampler, so it won't compile
134 // everywhere.
133 if (renderer()->Capabilities().using_egl_image) 135 if (renderer()->Capabilities().using_egl_image)
134 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision)); 136 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision));
135 else
136 EXPECT_FALSE(renderer()->GetVideoStreamTextureProgram(precision));
137 } 137 }
138 138
139 void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision, 139 void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision,
140 BlendMode blend_mode) { 140 BlendMode blend_mode) {
141 EXPECT_PROGRAM_VALID( 141 EXPECT_PROGRAM_VALID(
142 renderer()->GetRenderPassProgram(precision, blend_mode)); 142 renderer()->GetRenderPassProgram(precision, blend_mode));
143 EXPECT_PROGRAM_VALID( 143 EXPECT_PROGRAM_VALID(
144 renderer()->GetRenderPassProgramAA(precision, blend_mode)); 144 renderer()->GetRenderPassProgramAA(precision, blend_mode));
145 } 145 }
146 146
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 EXPECT_CALL(overlay_scheduler, 2231 EXPECT_CALL(overlay_scheduler,
2232 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2232 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2233 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2233 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2234 2234
2235 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2235 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2236 viewport_rect, false); 2236 viewport_rect, false);
2237 } 2237 }
2238 2238
2239 } // namespace 2239 } // namespace
2240 } // namespace cc 2240 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698