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

Side by Side Diff: cc/layers/io_surface_layer_impl.cc

Issue 12967018: cc: Avoid pointless gfx::Point/Size contructors when making Rects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RectFs as well Created 7 years, 9 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/layers/heads_up_display_layer_impl.cc ('k') | cc/layers/layer.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/layers/io_surface_layer_impl.h" 5 #include "cc/layers/io_surface_layer_impl.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "cc/layers/quad_sink.h" 8 #include "cc/layers/quad_sink.h"
9 #include "cc/output/gl_renderer.h" // For the GLC() macro. 9 #include "cc/output/gl_renderer.h" // For the GLC() macro.
10 #include "cc/output/output_surface.h" 10 #include "cc/output/output_surface.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 io_surface_changed_ = false; 93 io_surface_changed_ = false;
94 } 94 }
95 } 95 }
96 96
97 void IOSurfaceLayerImpl::AppendQuads(QuadSink* quad_sink, 97 void IOSurfaceLayerImpl::AppendQuads(QuadSink* quad_sink,
98 AppendQuadsData* append_quads_data) { 98 AppendQuadsData* append_quads_data) {
99 SharedQuadState* shared_quad_state = 99 SharedQuadState* shared_quad_state =
100 quad_sink->UseSharedQuadState(CreateSharedQuadState()); 100 quad_sink->UseSharedQuadState(CreateSharedQuadState());
101 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 101 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
102 102
103 gfx::Rect quad_rect(gfx::Point(), content_bounds()); 103 gfx::Rect quad_rect(content_bounds());
104 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); 104 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
105 scoped_ptr<IOSurfaceDrawQuad> quad = IOSurfaceDrawQuad::Create(); 105 scoped_ptr<IOSurfaceDrawQuad> quad = IOSurfaceDrawQuad::Create();
106 quad->SetNew(shared_quad_state, 106 quad->SetNew(shared_quad_state,
107 quad_rect, 107 quad_rect,
108 opaque_rect, 108 opaque_rect,
109 io_surface_size_, 109 io_surface_size_,
110 io_surface_texture_id_, 110 io_surface_texture_id_,
111 IOSurfaceDrawQuad::FLIPPED); 111 IOSurfaceDrawQuad::FLIPPED);
112 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); 112 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
113 } 113 }
(...skipping 22 matching lines...) Expand all
136 136
137 io_surface_id_ = io_surface_id; 137 io_surface_id_ = io_surface_id;
138 io_surface_size_ = size; 138 io_surface_size_ = size;
139 } 139 }
140 140
141 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { 141 const char* IOSurfaceLayerImpl::LayerTypeAsString() const {
142 return "IOSurfaceLayer"; 142 return "IOSurfaceLayer";
143 } 143 }
144 144
145 } // namespace cc 145 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698