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

Side by Side Diff: cc/test/render_pass_test_common.cc

Issue 11366199: Avoid redundantly setting tex parameters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removes now-dead textureFilter code, tests that we don't call texParameteri during draw 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/software_renderer_unittest.cc ('k') | cc/tile_draw_quad.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 "cc/test/render_pass_test_common.h" 5 #include "cc/test/render_pass_test_common.h"
6 6
7 #include "cc/checkerboard_draw_quad.h" 7 #include "cc/checkerboard_draw_quad.h"
8 #include "cc/debug_border_draw_quad.h" 8 #include "cc/debug_border_draw_quad.h"
9 #include "cc/io_surface_draw_quad.h" 9 #include "cc/io_surface_draw_quad.h"
10 #include "cc/render_pass_draw_quad.h" 10 #include "cc/render_pass_draw_quad.h"
(...skipping 21 matching lines...) Expand all
32 appendQuad(cc::DebugBorderDrawQuad::create(sharedState.get(), rect, SK_Color RED, 1).Pass().PassAs<DrawQuad>()); 32 appendQuad(cc::DebugBorderDrawQuad::create(sharedState.get(), rect, SK_Color RED, 1).Pass().PassAs<DrawQuad>());
33 appendQuad(cc::IOSurfaceDrawQuad::create(sharedState.get(), rect, gfx::Size( 50, 50), 1, cc::IOSurfaceDrawQuad::Flipped).PassAs<DrawQuad>()); 33 appendQuad(cc::IOSurfaceDrawQuad::create(sharedState.get(), rect, gfx::Size( 50, 50), 1, cc::IOSurfaceDrawQuad::Flipped).PassAs<DrawQuad>());
34 34
35 cc::RenderPass::Id passId(1, 1); 35 cc::RenderPass::Id passId(1, 1);
36 appendQuad(cc::RenderPassDrawQuad::create(sharedState.get(), rect, passId, f alse, 0, rect, 0, 0, 0, 0).PassAs<DrawQuad>()); 36 appendQuad(cc::RenderPassDrawQuad::create(sharedState.get(), rect, passId, f alse, 0, rect, 0, 0, 0, 0).PassAs<DrawQuad>());
37 37
38 appendQuad(cc::SolidColorDrawQuad::create(sharedState.get(), rect, SK_ColorR ED).PassAs<DrawQuad>()); 38 appendQuad(cc::SolidColorDrawQuad::create(sharedState.get(), rect, SK_ColorR ED).PassAs<DrawQuad>());
39 appendQuad(cc::StreamVideoDrawQuad::create(sharedState.get(), rect, 1, WebKi t::WebTransformationMatrix()).PassAs<DrawQuad>()); 39 appendQuad(cc::StreamVideoDrawQuad::create(sharedState.get(), rect, 1, WebKi t::WebTransformationMatrix()).PassAs<DrawQuad>());
40 appendQuad(cc::TextureDrawQuad::create(sharedState.get(), rect, textureResou rce, false, rect, false).PassAs<DrawQuad>()); 40 appendQuad(cc::TextureDrawQuad::create(sharedState.get(), rect, textureResou rce, false, rect, false).PassAs<DrawQuad>());
41 41
42 appendQuad(cc::TileDrawQuad::create(sharedState.get(), rect, rect, textureRe source, gfx::Vector2d(), gfx::Size(100, 100), GL_LINEAR, false, false, false, fa lse, false).PassAs<DrawQuad>()); 42 appendQuad(cc::TileDrawQuad::create(sharedState.get(), rect, rect, textureRe source, gfx::Vector2d(), gfx::Size(100, 100), false, false, false, false, false) .PassAs<DrawQuad>());
43 43
44 cc::VideoLayerImpl::FramePlane planes[3]; 44 cc::VideoLayerImpl::FramePlane planes[3];
45 for (int i = 0; i < 3; ++i) { 45 for (int i = 0; i < 3; ++i) {
46 planes[i].resourceId = resourceProvider->createResourceFromExternalTextu re(1); 46 planes[i].resourceId = resourceProvider->createResourceFromExternalTextu re(1);
47 planes[i].size = gfx::Size(100, 100); 47 planes[i].size = gfx::Size(100, 100);
48 planes[i].format = GL_LUMINANCE; 48 planes[i].format = GL_LUMINANCE;
49 } 49 }
50 appendQuad(cc::YUVVideoDrawQuad::create(sharedState.get(), rect, gfx::Size(1 00, 100), planes[0], planes[1], planes[2]).PassAs<DrawQuad>()); 50 appendQuad(cc::YUVVideoDrawQuad::create(sharedState.get(), rect, gfx::Size(1 00, 100), planes[0], planes[1], planes[2]).PassAs<DrawQuad>());
51 appendSharedQuadState(sharedState.Pass()); 51 appendSharedQuadState(sharedState.Pass());
52 } 52 }
53 53
54 } // namespace WebKitTests 54 } // namespace WebKitTests
OLDNEW
« no previous file with comments | « cc/software_renderer_unittest.cc ('k') | cc/tile_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698