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

Side by Side Diff: remoting/client/plugin/pepper_view.cc

Issue 3020038: Revert 53892 - Initial scriptable object implementation.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.cc ('k') | remoting/client/x11_view.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "remoting/client/plugin/pepper_view.h" 5 #include "remoting/client/plugin/pepper_view.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "remoting/base/decoder_zlib.h" 8 #include "remoting/base/decoder_zlib.h"
9 #include "remoting/client/plugin/chromoting_plugin.h" 9 #include "remoting/client/plugin/chromoting_plugin.h"
10 #include "remoting/client/plugin/pepper_util.h" 10 #include "remoting/client/plugin/pepper_util.h"
(...skipping 25 matching lines...) Expand all
36 36
37 void PepperView::TearDown() { 37 void PepperView::TearDown() {
38 } 38 }
39 39
40 void PepperView::Paint() { 40 void PepperView::Paint() {
41 if (!plugin_->CurrentlyOnPluginThread()) { 41 if (!plugin_->CurrentlyOnPluginThread()) {
42 RunTaskOnPluginThread(NewRunnableMethod(this, &PepperView::Paint)); 42 RunTaskOnPluginThread(NewRunnableMethod(this, &PepperView::Paint));
43 return; 43 return;
44 } 44 }
45 45
46 // TODO(ajwong): We're assuming the native format is BGRA_PREMUL below. This 46 // TODO(ajwong): We shouldn't assume the image data format.
47 // is wrong. 47 pp::ImageData image(PP_IMAGEDATAFORMAT_BGRA_PREMUL,
48 pp::ImageData image(pp::ImageData::GetNativeImageDataFormat(),
49 pp::Size(viewport_width_, viewport_height_), 48 pp::Size(viewport_width_, viewport_height_),
50 false); 49 false);
51 if (image.is_null()) { 50 if (image.is_null()) {
52 LOG(ERROR) << "Unable to allocate image of size: " 51 LOG(ERROR) << "Unable to allocate image.";
53 << viewport_width_ << "x" << viewport_height_;
54 return; 52 return;
55 } 53 }
56 54
57 if (is_static_fill_) { 55 if (is_static_fill_) {
58 for (int y = 0; y < image.size().height(); y++) { 56 for (int y = 0; y < image.size().height(); y++) {
59 for (int x = 0; x < image.size().width(); x++) { 57 for (int x = 0; x < image.size().width(); x++) {
60 *image.GetAddr32(pp::Point(x, y)) = static_fill_color_; 58 *image.GetAddr32(pp::Point(x, y)) = static_fill_color_;
61 } 59 }
62 } 60 }
63 } else if (frame_) { 61 } else if (frame_) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 update_rects_.begin(), update_rects_.end()); 202 update_rects_.begin(), update_rects_.end());
205 Paint(); 203 Paint();
206 // TODO(ajwong): Need to block here to be synchronous. 204 // TODO(ajwong): Need to block here to be synchronous.
207 } 205 }
208 206
209 207
210 void PepperView::OnDecodeDone() { 208 void PepperView::OnDecodeDone() {
211 } 209 }
212 210
213 } // namespace remoting 211 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.cc ('k') | remoting/client/x11_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698