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

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

Issue 398533002: Make DrawQuad constructors public, rm DQ::Create() function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get rid of make_scoped_ptr Created 6 years, 5 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
« no previous file with comments | « cc/quads/surface_draw_quad.h ('k') | cc/quads/texture_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/surface_draw_quad.h" 5 #include "cc/quads/surface_draw_quad.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 SurfaceDrawQuad::SurfaceDrawQuad() { 12 SurfaceDrawQuad::SurfaceDrawQuad() {
13 } 13 }
14 14
15 scoped_ptr<SurfaceDrawQuad> SurfaceDrawQuad::Create() {
16 return make_scoped_ptr(new SurfaceDrawQuad);
17 }
18
19 void SurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state, 15 void SurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
20 const gfx::Rect& rect, 16 const gfx::Rect& rect,
21 const gfx::Rect& visible_rect, 17 const gfx::Rect& visible_rect,
22 SurfaceId surface_id) { 18 SurfaceId surface_id) {
23 gfx::Rect opaque_rect; 19 gfx::Rect opaque_rect;
24 bool needs_blending = false; 20 bool needs_blending = false;
25 DrawQuad::SetAll(shared_quad_state, DrawQuad::SURFACE_CONTENT, rect, 21 DrawQuad::SetAll(shared_quad_state, DrawQuad::SURFACE_CONTENT, rect,
26 opaque_rect, visible_rect, needs_blending); 22 opaque_rect, visible_rect, needs_blending);
27 this->surface_id = surface_id; 23 this->surface_id = surface_id;
28 } 24 }
(...skipping 16 matching lines...) Expand all
45 DCHECK_EQ(quad->material, DrawQuad::SURFACE_CONTENT); 41 DCHECK_EQ(quad->material, DrawQuad::SURFACE_CONTENT);
46 return static_cast<const SurfaceDrawQuad*>(quad); 42 return static_cast<const SurfaceDrawQuad*>(quad);
47 } 43 }
48 44
49 void SurfaceDrawQuad::ExtendValue(base::DictionaryValue* value) const { 45 void SurfaceDrawQuad::ExtendValue(base::DictionaryValue* value) const {
50 value->SetInteger("surface_id", surface_id.id); 46 value->SetInteger("surface_id", surface_id.id);
51 } 47 }
52 48
53 49
54 } // namespace cc 50 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/surface_draw_quad.h ('k') | cc/quads/texture_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698