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

Side by Side Diff: cc/io_surface_draw_quad.cc

Issue 11418047: cc: Turn DrawQuad into a struct-like class with public data members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no virtual for SetAll() 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/gl_renderer.cc ('k') | cc/layer_tree_host_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/io_surface_draw_quad.h" 5 #include "cc/io_surface_draw_quad.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 scoped_ptr<IOSurfaceDrawQuad> IOSurfaceDrawQuad::create(const SharedQuadState* s haredQuadState, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect, const gf x::Size& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation) 11 scoped_ptr<IOSurfaceDrawQuad> IOSurfaceDrawQuad::create(const SharedQuadState* s haredQuadState, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect, const gf x::Size& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation)
12 { 12 {
13 return make_scoped_ptr(new IOSurfaceDrawQuad(sharedQuadState, quadRect, opaq ueRect, ioSurfaceSize, ioSurfaceTextureId, orientation)); 13 return make_scoped_ptr(new IOSurfaceDrawQuad(sharedQuadState, quadRect, opaq ueRect, ioSurfaceSize, ioSurfaceTextureId, orientation));
14 } 14 }
15 15
16 IOSurfaceDrawQuad::IOSurfaceDrawQuad(const SharedQuadState* sharedQuadState, con st gfx::Rect& quadRect, const gfx::Rect& opaqueRect, const gfx::Size& ioSurfaceS ize, unsigned ioSurfaceTextureId, Orientation orientation) 16 IOSurfaceDrawQuad::IOSurfaceDrawQuad(const SharedQuadState* sharedQuadState, con st gfx::Rect& quadRect, const gfx::Rect& opaqueRect, const gfx::Size& ioSurfaceS ize, unsigned ioSurfaceTextureId, Orientation orientation)
17 : DrawQuad(sharedQuadState, DrawQuad::IO_SURFACE_CONTENT, quadRect, opaqueRe ct) 17 : m_ioSurfaceSize(ioSurfaceSize)
18 , m_ioSurfaceSize(ioSurfaceSize)
19 , m_ioSurfaceTextureId(ioSurfaceTextureId) 18 , m_ioSurfaceTextureId(ioSurfaceTextureId)
20 , m_orientation(orientation) 19 , m_orientation(orientation)
21 { 20 {
21 gfx::Rect visibleRect = quadRect;
22 bool needsBlending = false;
23 DrawQuad::SetAll(sharedQuadState, DrawQuad::IO_SURFACE_CONTENT, quadRect, op aqueRect, visibleRect, needsBlending);
22 } 24 }
23 25
24 const IOSurfaceDrawQuad* IOSurfaceDrawQuad::materialCast(const DrawQuad* quad) 26 const IOSurfaceDrawQuad* IOSurfaceDrawQuad::materialCast(const DrawQuad* quad)
25 { 27 {
26 DCHECK(quad->material() == DrawQuad::IO_SURFACE_CONTENT); 28 DCHECK(quad->material == DrawQuad::IO_SURFACE_CONTENT);
27 return static_cast<const IOSurfaceDrawQuad*>(quad); 29 return static_cast<const IOSurfaceDrawQuad*>(quad);
28 } 30 }
29 31
30 } // namespace cc 32 } // namespace cc
OLDNEW
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698