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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc

Issue 1272153004: Add glCompressedCopySubTextureCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h" 5 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "gpu/command_buffer/service/gl_utils.h" 10 #include "gpu/command_buffer/service/gl_utils.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 GLsizei dest_height, 464 GLsizei dest_height,
465 GLsizei source_width, 465 GLsizei source_width,
466 GLsizei source_height, 466 GLsizei source_height,
467 bool flip_y, 467 bool flip_y,
468 bool premultiply_alpha, 468 bool premultiply_alpha,
469 bool unpremultiply_alpha, 469 bool unpremultiply_alpha,
470 const GLfloat transform_matrix[16]) { 470 const GLfloat transform_matrix[16]) {
471 DCHECK(source_target == GL_TEXTURE_2D || 471 DCHECK(source_target == GL_TEXTURE_2D ||
472 source_target == GL_TEXTURE_RECTANGLE_ARB || 472 source_target == GL_TEXTURE_RECTANGLE_ARB ||
473 source_target == GL_TEXTURE_EXTERNAL_OES); 473 source_target == GL_TEXTURE_EXTERNAL_OES);
474 DCHECK(xoffset >= 0 && xoffset + source_width <= dest_width); 474 DCHECK(xoffset >= 0 && xoffset + width <= dest_width);
475 DCHECK(yoffset >= 0 && yoffset + source_height <= dest_height); 475 DCHECK(yoffset >= 0 && yoffset + height <= dest_height);
reveman 2015/08/05 16:07:40 While here, can you split this into 4 DCHECKs inst
christiank 2015/08/06 13:48:21 Done.
476 if (!initialized_) { 476 if (!initialized_) {
477 DLOG(ERROR) << "CopyTextureCHROMIUM: Uninitialized manager."; 477 DLOG(ERROR) << "CopyTextureCHROMIUM: Uninitialized manager.";
478 return; 478 return;
479 } 479 }
480 480
481 VertexShaderId vertex_shader_id = GetVertexShaderId(flip_y); 481 VertexShaderId vertex_shader_id = GetVertexShaderId(flip_y);
482 DCHECK_LT(static_cast<size_t>(vertex_shader_id), vertex_shaders_.size()); 482 DCHECK_LT(static_cast<size_t>(vertex_shader_id), vertex_shaders_.size());
483 FragmentShaderId fragment_shader_id = GetFragmentShaderId( 483 FragmentShaderId fragment_shader_id = GetFragmentShaderId(
484 premultiply_alpha, unpremultiply_alpha, source_target); 484 premultiply_alpha, unpremultiply_alpha, source_target);
485 DCHECK_LT(static_cast<size_t>(fragment_shader_id), fragment_shaders_.size()); 485 DCHECK_LT(static_cast<size_t>(fragment_shader_id), fragment_shaders_.size());
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 decoder->RestoreTextureState(dest_id); 590 decoder->RestoreTextureState(dest_id);
591 decoder->RestoreTextureUnitBindings(0); 591 decoder->RestoreTextureUnitBindings(0);
592 decoder->RestoreActiveTexture(); 592 decoder->RestoreActiveTexture();
593 decoder->RestoreProgramBindings(); 593 decoder->RestoreProgramBindings();
594 decoder->RestoreBufferBindings(); 594 decoder->RestoreBufferBindings();
595 decoder->RestoreFramebufferBindings(); 595 decoder->RestoreFramebufferBindings();
596 decoder->RestoreGlobalState(); 596 decoder->RestoreGlobalState();
597 } 597 }
598 598
599 } // namespace gpu 599 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698