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

Side by Side Diff: cc/quads/picture_draw_quad.cc

Issue 13863015: Add flag for drawing layers to screen with Ganesh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again Created 7 years, 7 months 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/quads/picture_draw_quad.h ('k') | cc/resources/picture.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/quads/picture_draw_quad.h" 5 #include "cc/quads/picture_draw_quad.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 PictureDrawQuad::PictureDrawQuad() { 9 PictureDrawQuad::PictureDrawQuad() {
10 } 10 }
11 11
12 PictureDrawQuad::~PictureDrawQuad() { 12 PictureDrawQuad::~PictureDrawQuad() {
13 } 13 }
14 14
15 scoped_ptr<PictureDrawQuad> PictureDrawQuad::Create() { 15 scoped_ptr<PictureDrawQuad> PictureDrawQuad::Create() {
16 return make_scoped_ptr(new PictureDrawQuad); 16 return make_scoped_ptr(new PictureDrawQuad);
17 } 17 }
18 18
19 void PictureDrawQuad::SetNew(const SharedQuadState* shared_quad_state, 19 void PictureDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
20 gfx::Rect rect, 20 gfx::Rect rect,
21 gfx::Rect opaque_rect, 21 gfx::Rect opaque_rect,
22 const gfx::RectF& tex_coord_rect, 22 const gfx::RectF& tex_coord_rect,
23 gfx::Size texture_size, 23 gfx::Size texture_size,
24 bool swizzle_contents, 24 bool swizzle_contents,
25 gfx::Rect content_rect, 25 gfx::Rect content_rect,
26 float contents_scale, 26 float contents_scale,
27 bool can_draw_direct_to_backbuffer,
27 scoped_refptr<PicturePileImpl> picture_pile) { 28 scoped_refptr<PicturePileImpl> picture_pile) {
28 ContentDrawQuadBase::SetNew(shared_quad_state, DrawQuad::PICTURE_CONTENT, 29 ContentDrawQuadBase::SetNew(shared_quad_state, DrawQuad::PICTURE_CONTENT,
29 rect, opaque_rect, tex_coord_rect, texture_size, 30 rect, opaque_rect, tex_coord_rect, texture_size,
30 swizzle_contents); 31 swizzle_contents);
31 this->content_rect = content_rect; 32 this->content_rect = content_rect;
32 this->contents_scale = contents_scale; 33 this->contents_scale = contents_scale;
34 this->can_draw_direct_to_backbuffer = can_draw_direct_to_backbuffer;
33 this->picture_pile = picture_pile; 35 this->picture_pile = picture_pile;
34 } 36 }
35 37
36 void PictureDrawQuad::SetAll(const SharedQuadState* shared_quad_state, 38 void PictureDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
37 gfx::Rect rect, 39 gfx::Rect rect,
38 gfx::Rect opaque_rect, 40 gfx::Rect opaque_rect,
39 gfx::Rect visible_rect, 41 gfx::Rect visible_rect,
40 bool needs_blending, 42 bool needs_blending,
41 const gfx::RectF& tex_coord_rect, 43 const gfx::RectF& tex_coord_rect,
42 gfx::Size texture_size, 44 gfx::Size texture_size,
43 bool swizzle_contents, 45 bool swizzle_contents,
44 gfx::Rect content_rect, 46 gfx::Rect content_rect,
45 float contents_scale, 47 float contents_scale,
48 bool can_draw_direct_to_backbuffer,
46 scoped_refptr<PicturePileImpl> picture_pile) { 49 scoped_refptr<PicturePileImpl> picture_pile) {
47 ContentDrawQuadBase::SetAll(shared_quad_state, 50 ContentDrawQuadBase::SetAll(shared_quad_state,
48 DrawQuad::PICTURE_CONTENT, rect, opaque_rect, 51 DrawQuad::PICTURE_CONTENT, rect, opaque_rect,
49 visible_rect, needs_blending, tex_coord_rect, 52 visible_rect, needs_blending, tex_coord_rect,
50 texture_size, swizzle_contents); 53 texture_size, swizzle_contents);
51 this->content_rect = content_rect; 54 this->content_rect = content_rect;
52 this->contents_scale = contents_scale; 55 this->contents_scale = contents_scale;
56 this->can_draw_direct_to_backbuffer = can_draw_direct_to_backbuffer;
53 this->picture_pile = picture_pile; 57 this->picture_pile = picture_pile;
54 } 58 }
55 59
56 void PictureDrawQuad::IterateResources( 60 void PictureDrawQuad::IterateResources(
57 const ResourceIteratorCallback& callback) { 61 const ResourceIteratorCallback& callback) {
58 // TODO(danakj): Convert to TextureDrawQuad? 62 // TODO(danakj): Convert to TextureDrawQuad?
59 NOTIMPLEMENTED(); 63 NOTIMPLEMENTED();
60 } 64 }
61 65
62 const PictureDrawQuad* PictureDrawQuad::MaterialCast(const DrawQuad* quad) { 66 const PictureDrawQuad* PictureDrawQuad::MaterialCast(const DrawQuad* quad) {
63 DCHECK(quad->material == DrawQuad::PICTURE_CONTENT); 67 DCHECK(quad->material == DrawQuad::PICTURE_CONTENT);
64 return static_cast<const PictureDrawQuad*>(quad); 68 return static_cast<const PictureDrawQuad*>(quad);
65 } 69 }
66 70
67 } // namespace cc 71 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/picture_draw_quad.h ('k') | cc/resources/picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698