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

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

Issue 341023003: cc: Pass scaled bounds to debug border quads for drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: avoid extra overload function Created 6 years, 6 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 | « no previous file | cc/layers/layer_impl.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 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/strings/stringprintf.h" 7 #include "base/strings/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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 return LayerImpl::WillDraw(draw_mode, resource_provider); 64 return LayerImpl::WillDraw(draw_mode, resource_provider);
65 } 65 }
66 66
67 void IOSurfaceLayerImpl::AppendQuads(QuadSink* quad_sink, 67 void IOSurfaceLayerImpl::AppendQuads(QuadSink* quad_sink,
68 AppendQuadsData* append_quads_data) { 68 AppendQuadsData* append_quads_data) {
69 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState(); 69 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState();
70 PopulateSharedQuadState(shared_quad_state); 70 PopulateSharedQuadState(shared_quad_state);
71 71
72 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 72 AppendDebugBorderQuad(
73 quad_sink, content_bounds(), shared_quad_state, append_quads_data);
73 74
74 gfx::Rect quad_rect(content_bounds()); 75 gfx::Rect quad_rect(content_bounds());
75 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); 76 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
76 gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect( 77 gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect(
77 quad_rect, draw_properties().target_space_transform); 78 quad_rect, draw_properties().target_space_transform);
78 if (visible_quad_rect.IsEmpty()) 79 if (visible_quad_rect.IsEmpty())
79 return; 80 return;
80 81
81 scoped_ptr<IOSurfaceDrawQuad> quad = IOSurfaceDrawQuad::Create(); 82 scoped_ptr<IOSurfaceDrawQuad> quad = IOSurfaceDrawQuad::Create();
82 quad->SetNew(shared_quad_state, 83 quad->SetNew(shared_quad_state,
(...skipping 20 matching lines...) Expand all
103 104
104 io_surface_id_ = io_surface_id; 105 io_surface_id_ = io_surface_id;
105 io_surface_size_ = size; 106 io_surface_size_ = size;
106 } 107 }
107 108
108 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { 109 const char* IOSurfaceLayerImpl::LayerTypeAsString() const {
109 return "cc::IOSurfaceLayerImpl"; 110 return "cc::IOSurfaceLayerImpl";
110 } 111 }
111 112
112 } // namespace cc 113 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698