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

Side by Side Diff: cc/output/direct_renderer.cc

Issue 1035863002: Remove SetDrawViewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/output/direct_renderer.h" 5 #include "cc/output/direct_renderer.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 draw_rect.bottom()); 101 draw_rect.bottom());
102 } 102 }
103 103
104 gfx::Rect window_rect = viewport_rect; 104 gfx::Rect window_rect = viewport_rect;
105 if (flip_y) 105 if (flip_y)
106 window_rect.set_y(surface_size.height() - viewport_rect.bottom()); 106 window_rect.set_y(surface_size.height() - viewport_rect.bottom());
107 frame->window_matrix = window_matrix(window_rect.x(), 107 frame->window_matrix = window_matrix(window_rect.x(),
108 window_rect.y(), 108 window_rect.y(),
109 window_rect.width(), 109 window_rect.width(),
110 window_rect.height()); 110 window_rect.height());
111 SetDrawViewport(window_rect);
112
113 current_draw_rect_ = draw_rect; 111 current_draw_rect_ = draw_rect;
114 current_viewport_rect_ = viewport_rect; 112 current_viewport_rect_ = viewport_rect;
115 current_surface_size_ = surface_size; 113 current_surface_size_ = surface_size;
114 current_window_space_viewport_ = window_rect;
116 } 115 }
117 116
118 gfx::Rect DirectRenderer::MoveFromDrawToWindowSpace( 117 gfx::Rect DirectRenderer::MoveFromDrawToWindowSpace(
119 const DrawingFrame* frame, 118 const DrawingFrame* frame,
120 const gfx::Rect& draw_rect) const { 119 const gfx::Rect& draw_rect) const {
121 gfx::Rect window_rect = draw_rect; 120 gfx::Rect window_rect = draw_rect;
122 window_rect -= current_draw_rect_.OffsetFromOrigin(); 121 window_rect -= current_draw_rect_.OffsetFromOrigin();
123 window_rect += current_viewport_rect_.OffsetFromOrigin(); 122 window_rect += current_viewport_rect_.OffsetFromOrigin();
124 if (FlippedFramebuffer(frame)) 123 if (FlippedFramebuffer(frame))
125 window_rect.set_y(current_surface_size_.height() - window_rect.bottom()); 124 window_rect.set_y(current_surface_size_.height() - window_rect.bottom());
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 ScopedResource* texture = render_pass_textures_.get(id); 519 ScopedResource* texture = render_pass_textures_.get(id);
521 return texture && texture->id(); 520 return texture && texture->id();
522 } 521 }
523 522
524 // static 523 // static
525 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 524 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
526 return render_pass->output_rect.size(); 525 return render_pass->output_rect.size();
527 } 526 }
528 527
529 } // namespace cc 528 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | cc/output/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698