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

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

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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/output/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 } 2395 }
2396 2396
2397 EnforceMemoryPolicy(); 2397 EnforceMemoryPolicy();
2398 } 2398 }
2399 2399
2400 void GLRenderer::FinishedReadback( 2400 void GLRenderer::FinishedReadback(
2401 const AsyncGetFramebufferPixelsCleanupCallback& cleanup_callback, 2401 const AsyncGetFramebufferPixelsCleanupCallback& cleanup_callback,
2402 unsigned source_buffer, 2402 unsigned source_buffer,
2403 unsigned query, 2403 unsigned query,
2404 uint8* dest_pixels, 2404 uint8* dest_pixels,
2405 gfx::Size size) { 2405 const gfx::Size& size) {
2406 DCHECK(!pending_async_read_pixels_.empty()); 2406 DCHECK(!pending_async_read_pixels_.empty());
2407 2407
2408 if (query != 0) { 2408 if (query != 0) {
2409 GLC(gl_, gl_->DeleteQueriesEXT(1, &query)); 2409 GLC(gl_, gl_->DeleteQueriesEXT(1, &query));
2410 } 2410 }
2411 2411
2412 PendingAsyncReadPixels* current_read = pending_async_read_pixels_.back(); 2412 PendingAsyncReadPixels* current_read = pending_async_read_pixels_.back();
2413 // Make sure we service the readbacks in order. 2413 // Make sure we service the readbacks in order.
2414 DCHECK_EQ(source_buffer, current_read->buffer); 2414 DCHECK_EQ(source_buffer, current_read->buffer);
2415 2415
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 is_scissor_enabled_ = false; 3003 is_scissor_enabled_ = false;
3004 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); 3004 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST));
3005 scissor_rect_needs_reset_ = true; 3005 scissor_rect_needs_reset_ = true;
3006 } 3006 }
3007 3007
3008 bool GLRenderer::IsContextLost() { 3008 bool GLRenderer::IsContextLost() {
3009 return output_surface_->context_provider()->IsContextLost(); 3009 return output_surface_->context_provider()->IsContextLost();
3010 } 3010 }
3011 3011
3012 } // namespace cc 3012 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698