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

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

Issue 1515723002: cc: Avoid crash on Android in GLRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 5 years 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 void TestBasicShaders() { 127 void TestBasicShaders() {
128 EXPECT_PROGRAM_VALID(renderer()->GetDebugBorderProgram()); 128 EXPECT_PROGRAM_VALID(renderer()->GetDebugBorderProgram());
129 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgram()); 129 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgram());
130 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgramAA()); 130 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgramAA());
131 } 131 }
132 132
133 void TestShadersWithPrecision(TexCoordPrecision precision) { 133 void TestShadersWithPrecision(TexCoordPrecision precision) {
134 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision)); 134 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision));
135 if (renderer()->Capabilities().using_egl_image) 135 if (renderer()->Capabilities().using_egl_image)
danakj 2015/12/10 00:00:04 can you remove this at the same time?
no sievers 2015/12/10 00:05:51 makes sense. done.
136 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision)); 136 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision));
137 else
138 EXPECT_FALSE(renderer()->GetVideoStreamTextureProgram(precision));
139 } 137 }
140 138
141 void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision, 139 void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision,
142 BlendMode blend_mode) { 140 BlendMode blend_mode) {
143 EXPECT_PROGRAM_VALID( 141 EXPECT_PROGRAM_VALID(
144 renderer()->GetRenderPassProgram(precision, blend_mode)); 142 renderer()->GetRenderPassProgram(precision, blend_mode));
145 EXPECT_PROGRAM_VALID( 143 EXPECT_PROGRAM_VALID(
146 renderer()->GetRenderPassProgramAA(precision, blend_mode)); 144 renderer()->GetRenderPassProgramAA(precision, blend_mode));
147 } 145 }
148 146
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 EXPECT_CALL(overlay_scheduler, 2200 EXPECT_CALL(overlay_scheduler,
2203 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, 2201 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect,
2204 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); 2202 BoundingRect(uv_top_left, uv_bottom_right))).Times(1);
2205 2203
2206 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, 2204 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect,
2207 viewport_rect, false); 2205 viewport_rect, false);
2208 } 2206 }
2209 2207
2210 } // namespace 2208 } // namespace
2211 } // namespace cc 2209 } // 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