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

Side by Side Diff: cc/tile_draw_quad.cc

Issue 11412044: cc: Remove opaque flags from SharedQuadState and DrawQuad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/texture_layer_impl.cc ('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, bool swizzl eContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, 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, swizzleContents, leftEdgeAA, topEdgeA A, 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, bool swizzleContents, bool lef tEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA) 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::TILED_CONTENT, quadRect) 18 : DrawQuad(sharedQuadState, DrawQuad::TILED_CONTENT, quadRect, opaqueRect)
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_swizzleContents(swizzleContents) 22 , m_swizzleContents(swizzleContents)
23 , m_leftEdgeAA(leftEdgeAA) 23 , m_leftEdgeAA(leftEdgeAA)
24 , m_topEdgeAA(topEdgeAA) 24 , m_topEdgeAA(topEdgeAA)
25 , m_rightEdgeAA(rightEdgeAA) 25 , m_rightEdgeAA(rightEdgeAA)
26 , m_bottomEdgeAA(bottomEdgeAA) 26 , m_bottomEdgeAA(bottomEdgeAA)
27 { 27 {
28 if (isAntialiased()) 28 if (isAntialiased())
29 m_needsBlending = true; 29 m_needsBlending = true;
30 m_opaqueRect = opaqueRect;
31 } 30 }
32 31
33 const TileDrawQuad* TileDrawQuad::materialCast(const DrawQuad* quad) 32 const TileDrawQuad* TileDrawQuad::materialCast(const DrawQuad* quad)
34 { 33 {
35 DCHECK(quad->material() == DrawQuad::TILED_CONTENT); 34 DCHECK(quad->material() == DrawQuad::TILED_CONTENT);
36 return static_cast<const TileDrawQuad*>(quad); 35 return static_cast<const TileDrawQuad*>(quad);
37 } 36 }
38 37
39 } // namespace cc 38 } // namespace cc
OLDNEW
« no previous file with comments | « cc/texture_layer_impl.cc ('k') | cc/tiled_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698