OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SampleApp.h" | 8 #include "SampleApp.h" |
9 | 9 |
10 #include "OverView.h" | 10 #include "OverView.h" |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 if (fCurContext) { | 294 if (fCurContext) { |
295 // in case we have queued drawing calls | 295 // in case we have queued drawing calls |
296 fCurContext->flush(); | 296 fCurContext->flush(); |
297 | 297 |
298 if (!IsGpuDeviceType(dType)) { | 298 if (!IsGpuDeviceType(dType)) { |
299 // need to send the raster bits to the (gpu) window | 299 // need to send the raster bits to the (gpu) window |
300 fCurContext->setRenderTarget(fCurRenderTarget); | 300 fCurContext->setRenderTarget(fCurRenderTarget); |
301 const SkBitmap& bm = win->getBitmap(); | 301 const SkBitmap& bm = win->getBitmap(); |
302 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(), | 302 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(), |
303 SkImageInfo2GrPixelConfig(bm.colorT
ype(), | 303 SkImageInfo2GrPixelConfig(bm.colorT
ype(), |
304 bm.alphaT
ype()), | 304 bm.alphaT
ype(), |
| 305 bm.profil
eType()), |
305 bm.getPixels(), | 306 bm.getPixels(), |
306 bm.rowBytes(), | 307 bm.rowBytes(), |
307 GrContext::kFlushWrites_PixelOp); | 308 GrContext::kFlushWrites_PixelOp); |
308 } | 309 } |
309 } | 310 } |
310 #endif | 311 #endif |
311 | 312 |
312 win->present(); | 313 win->present(); |
313 } | 314 } |
314 | 315 |
(...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2433 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2434 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2434 #endif | 2435 #endif |
2435 SkGraphics::Init(); | 2436 SkGraphics::Init(); |
2436 SkEvent::Init(); | 2437 SkEvent::Init(); |
2437 } | 2438 } |
2438 | 2439 |
2439 void application_term() { | 2440 void application_term() { |
2440 SkEvent::Term(); | 2441 SkEvent::Term(); |
2441 SkGraphics::Term(); | 2442 SkGraphics::Term(); |
2442 } | 2443 } |
OLD | NEW |