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

Side by Side Diff: platform_tools/nacl/src/nacl_debugger.cpp

Issue 327643003: teach Nacl to not call setConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "ppapi/cpp/completion_callback.h" 9 #include "ppapi/cpp/completion_callback.h"
10 #include "ppapi/cpp/graphics_2d.h" 10 #include "ppapi/cpp/graphics_2d.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 fHeight = position.size().height(); 160 fHeight = position.size().height();
161 161
162 fDeviceContext = pp::Graphics2D(this, pp::Size(fWidth, fHeight), false); 162 fDeviceContext = pp::Graphics2D(this, pp::Size(fWidth, fHeight), false);
163 if (!BindGraphics(fDeviceContext)) { 163 if (!BindGraphics(fDeviceContext)) {
164 SkDebugf("Couldn't bind the device context\n"); 164 SkDebugf("Couldn't bind the device context\n");
165 return; 165 return;
166 } 166 }
167 fImage = pp::ImageData(this, 167 fImage = pp::ImageData(this,
168 PP_IMAGEDATAFORMAT_BGRA_PREMUL, 168 PP_IMAGEDATAFORMAT_BGRA_PREMUL,
169 pp::Size(fWidth, fHeight), false); 169 pp::Size(fWidth, fHeight), false);
170 fBitmap.setConfig(SkBitmap::kARGB_8888_Config, fWidth, fHeight); 170 const SkImageInfo info = SkImageInfo::MakeN32Premul(fWidth, fHeight);
171 fBitmap.setPixels(fImage.data()); 171 fBitmap.installPixels(info, fImage.data(), info.minRowBytes());
172 if (fCanvas) { 172 if (fCanvas) {
173 delete fCanvas; 173 delete fCanvas;
174 } 174 }
175 fCanvas = new SkCanvas(fBitmap); 175 fCanvas = new SkCanvas(fBitmap);
176 fCanvas->clear(SK_ColorWHITE); 176 fCanvas->clear(SK_ColorWHITE);
177 if (!fFlushLoopRunning) { 177 if (!fFlushLoopRunning) {
178 Paint(); 178 Paint();
179 } 179 }
180 } 180 }
181 181
(...skipping 29 matching lines...) Expand all
211 virtual pp::Instance* CreateInstance(PP_Instance instance) { 211 virtual pp::Instance* CreateInstance(PP_Instance instance) {
212 return new SkiaInstance(instance); 212 return new SkiaInstance(instance);
213 } 213 }
214 }; 214 };
215 215
216 namespace pp { 216 namespace pp {
217 Module* CreateModule() { 217 Module* CreateModule() {
218 return new SkiaModule(); 218 return new SkiaModule();
219 } 219 }
220 } // namespace pp 220 } // namespace pp
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