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

Side by Side Diff: cc/tile_draw_quad.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/tile_draw_quad.h ('k') | cc/tiled_layer_impl.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 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/tile_draw_quad.h" 5 #include "cc/tile_draw_quad.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/khronos/GLES2/gl2.h" 8 #include "third_party/khronos/GLES2/gl2.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 scoped_ptr<TileDrawQuad> TileDrawQuad::create(const SharedQuadState* sharedQuadS tate, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect, unsigned resourceI d, const gfx::Vector2d& textureOffset, const gfx::Size& textureSize, GLint textu reFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeA A, bool bottomEdgeAA) 12 scoped_ptr<TileDrawQuad> TileDrawQuad::create(const SharedQuadState* sharedQuadS tate, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect, unsigned resourceI d, const gfx::Vector2d& textureOffset, const gfx::Size& textureSize, bool swizzl eContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA)
13 { 13 {
14 return make_scoped_ptr(new TileDrawQuad(sharedQuadState, quadRect, opaqueRec t, resourceId, textureOffset, textureSize, textureFilter, swizzleContents, leftE dgeAA, topEdgeAA, rightEdgeAA, bottomEdgeAA)); 14 return make_scoped_ptr(new TileDrawQuad(sharedQuadState, quadRect, opaqueRec t, resourceId, textureOffset, textureSize, swizzleContents, leftEdgeAA, topEdgeA A, rightEdgeAA, bottomEdgeAA));
15 } 15 }
16 16
17 TileDrawQuad::TileDrawQuad(const SharedQuadState* sharedQuadState, const gfx::Re ct& quadRect, const gfx::Rect& opaqueRect, unsigned resourceId, const gfx::Vecto r2d& textureOffset, const gfx::Size& textureSize, GLint textureFilter, bool swiz zleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeA A) 17 TileDrawQuad::TileDrawQuad(const SharedQuadState* sharedQuadState, const gfx::Re ct& quadRect, const gfx::Rect& opaqueRect, unsigned resourceId, const gfx::Vecto r2d& textureOffset, const gfx::Size& textureSize, bool swizzleContents, bool lef tEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA)
18 : DrawQuad(sharedQuadState, DrawQuad::TiledContent, quadRect) 18 : DrawQuad(sharedQuadState, DrawQuad::TiledContent, quadRect)
19 , m_resourceId(resourceId) 19 , m_resourceId(resourceId)
20 , m_textureOffset(textureOffset) 20 , m_textureOffset(textureOffset)
21 , m_textureSize(textureSize) 21 , m_textureSize(textureSize)
22 , m_textureFilter(textureFilter)
23 , m_swizzleContents(swizzleContents) 22 , m_swizzleContents(swizzleContents)
24 , m_leftEdgeAA(leftEdgeAA) 23 , m_leftEdgeAA(leftEdgeAA)
25 , m_topEdgeAA(topEdgeAA) 24 , m_topEdgeAA(topEdgeAA)
26 , m_rightEdgeAA(rightEdgeAA) 25 , m_rightEdgeAA(rightEdgeAA)
27 , m_bottomEdgeAA(bottomEdgeAA) 26 , m_bottomEdgeAA(bottomEdgeAA)
28 { 27 {
29 if (isAntialiased()) 28 if (isAntialiased())
30 m_needsBlending = true; 29 m_needsBlending = true;
31 m_opaqueRect = opaqueRect; 30 m_opaqueRect = opaqueRect;
32 } 31 }
33 32
34 const TileDrawQuad* TileDrawQuad::materialCast(const DrawQuad* quad) 33 const TileDrawQuad* TileDrawQuad::materialCast(const DrawQuad* quad)
35 { 34 {
36 DCHECK(quad->material() == DrawQuad::TiledContent); 35 DCHECK(quad->material() == DrawQuad::TiledContent);
37 return static_cast<const TileDrawQuad*>(quad); 36 return static_cast<const TileDrawQuad*>(quad);
38 } 37 }
39 38
40 } // namespace cc 39 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tile_draw_quad.h ('k') | cc/tiled_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698