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

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

Issue 2849743002: Allow binding multiple textures to one DC Layer overlay. (Closed)
Patch Set: improve test Created 3 years, 7 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_decoder_passthrough.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h"
6 6
7 namespace gpu { 7 namespace gpu {
8 namespace gles2 { 8 namespace gles2 {
9 9
10 // Custom Handlers 10 // Custom Handlers
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 uint32_t immediate_data_size, 1809 uint32_t immediate_data_size,
1810 const volatile void* cmd_data) { 1810 const volatile void* cmd_data) {
1811 const volatile gles2::cmds::ScheduleDCLayerCHROMIUM& c = 1811 const volatile gles2::cmds::ScheduleDCLayerCHROMIUM& c =
1812 *static_cast<const volatile gles2::cmds::ScheduleDCLayerCHROMIUM*>( 1812 *static_cast<const volatile gles2::cmds::ScheduleDCLayerCHROMIUM*>(
1813 cmd_data); 1813 cmd_data);
1814 const GLfloat* mem = GetSharedMemoryAs<const GLfloat*>(c.shm_id, c.shm_offset, 1814 const GLfloat* mem = GetSharedMemoryAs<const GLfloat*>(c.shm_id, c.shm_offset,
1815 8 * sizeof(GLfloat)); 1815 8 * sizeof(GLfloat));
1816 if (!mem) { 1816 if (!mem) {
1817 return error::kOutOfBounds; 1817 return error::kOutOfBounds;
1818 } 1818 }
1819 GLuint contents_texture_id = static_cast<GLint>(c.contents_texture_id);
1820 const GLfloat* contents_rect = mem; 1819 const GLfloat* contents_rect = mem;
1821 GLuint background_color = static_cast<GLuint>(c.background_color); 1820 GLuint background_color = static_cast<GLuint>(c.background_color);
1822 GLuint edge_aa_mask = static_cast<GLuint>(c.edge_aa_mask); 1821 GLuint edge_aa_mask = static_cast<GLuint>(c.edge_aa_mask);
1823 const GLfloat* bounds_rect = mem + 4; 1822 const GLfloat* bounds_rect = mem + 4;
1824 error::Error error = 1823 error::Error error = DoScheduleDCLayerCHROMIUM(
1825 DoScheduleDCLayerCHROMIUM(contents_texture_id, contents_rect, 1824 contents_rect, background_color, edge_aa_mask, bounds_rect);
1826 background_color, edge_aa_mask, bounds_rect);
1827 if (error != error::kNoError) { 1825 if (error != error::kNoError) {
1828 return error; 1826 return error;
1829 } 1827 }
1830 return error::kNoError; 1828 return error::kNoError;
1831 } 1829 }
1832 1830
1833 error::Error GLES2DecoderPassthroughImpl::HandleGenPathsCHROMIUM( 1831 error::Error GLES2DecoderPassthroughImpl::HandleGenPathsCHROMIUM(
1834 uint32_t immediate_data_size, 1832 uint32_t immediate_data_size,
1835 const volatile void* cmd_data) { 1833 const volatile void* cmd_data) {
1836 const volatile gles2::cmds::GenPathsCHROMIUM& c = 1834 const volatile gles2::cmds::GenPathsCHROMIUM& c =
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2716 reinterpret_cast<const void*>(static_cast<intptr_t>(data_shm_offset)); 2714 reinterpret_cast<const void*>(static_cast<intptr_t>(data_shm_offset));
2717 } 2715 }
2718 2716
2719 return DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, 2717 return DoCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset,
2720 width, height, depth, format, image_size, 2718 width, height, depth, format, image_size,
2721 data_size, data); 2719 data_size, data);
2722 } 2720 }
2723 2721
2724 } // namespace gles2 2722 } // namespace gles2
2725 } // namespace gpu 2723 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698