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

Side by Side Diff: ppapi/proxy/video_decoder_resource.cc

Issue 1021053005: Fix size calcuation in video_decoder_resource.cc (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/proxy/video_decoder_resource.h" 5 #include "ppapi/proxy/video_decoder_resource.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
9 #include "gpu/command_buffer/client/gles2_implementation.h" 9 #include "gpu/command_buffer/client/gles2_implementation.h"
10 #include "gpu/command_buffer/common/mailbox.h" 10 #include "gpu/command_buffer/common/mailbox.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 get_picture_0_1_(NULL), 66 get_picture_0_1_(NULL),
67 gles2_impl_(NULL), 67 gles2_impl_(NULL),
68 initialized_(false), 68 initialized_(false),
69 testing_(false), 69 testing_(false),
70 // Set |decoder_last_error_| to PP_OK after successful initialization. 70 // Set |decoder_last_error_| to PP_OK after successful initialization.
71 // This makes error checking a little more concise, since we can check 71 // This makes error checking a little more concise, since we can check
72 // that the decoder has been initialized and hasn't returned an error by 72 // that the decoder has been initialized and hasn't returned an error by
73 // just testing |decoder_last_error_|. 73 // just testing |decoder_last_error_|.
74 decoder_last_error_(PP_ERROR_FAILED) { 74 decoder_last_error_(PP_ERROR_FAILED) {
75 // Clear the decode_ids_ array. 75 // Clear the decode_ids_ array.
76 memset(decode_ids_, 0, arraysize(decode_ids_)); 76 memset(decode_ids_, 0, sizeof(decode_ids_));
77 SendCreate(RENDERER, PpapiHostMsg_VideoDecoder_Create()); 77 SendCreate(RENDERER, PpapiHostMsg_VideoDecoder_Create());
78 } 78 }
79 79
80 VideoDecoderResource::~VideoDecoderResource() { 80 VideoDecoderResource::~VideoDecoderResource() {
81 // Destroy any textures which haven't been dismissed. 81 // Destroy any textures which haven't been dismissed.
82 TextureMap::iterator it = textures_.begin(); 82 TextureMap::iterator it = textures_.begin();
83 for (; it != textures_.end(); ++it) 83 for (; it != textures_.end(); ++it)
84 DeleteGLTexture(it->first); 84 DeleteGLTexture(it->first);
85 } 85 }
86 86
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 get_picture_0_1_->texture_target = texture_target; 554 get_picture_0_1_->texture_target = texture_target;
555 get_picture_0_1_->texture_size = texture_size; 555 get_picture_0_1_->texture_size = texture_size;
556 get_picture_0_1_ = NULL; 556 get_picture_0_1_ = NULL;
557 } 557 }
558 558
559 received_pictures_.pop(); 559 received_pictures_.pop();
560 } 560 }
561 561
562 } // namespace proxy 562 } // namespace proxy
563 } // namespace ppapi 563 } // namespace ppapi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698