| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 if (fCurContext) { | 303 if (fCurContext) { |
| 304 // in case we have queued drawing calls | 304 // in case we have queued drawing calls |
| 305 fCurContext->flush(); | 305 fCurContext->flush(); |
| 306 | 306 |
| 307 if (!IsGpuDeviceType(dType)) { | 307 if (!IsGpuDeviceType(dType)) { |
| 308 // need to send the raster bits to the (gpu) window | 308 // need to send the raster bits to the (gpu) window |
| 309 const SkBitmap& bm = win->getBitmap(); | 309 const SkBitmap& bm = win->getBitmap(); |
| 310 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(), | 310 fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(), |
| 311 SkImageInfo2GrPixelConfig(bm.colorT
ype(), | 311 SkImageInfo2GrPixelConfig(bm.colorT
ype(), |
| 312 bm.alphaT
ype(), | 312 bm.alphaT
ype(), |
| 313 bm.profil
eType()), | 313 bm.profil
eType(), |
| 314 *fCurCont
ext->caps()), |
| 314 bm.getPixels(), | 315 bm.getPixels(), |
| 315 bm.rowBytes(), | 316 bm.rowBytes(), |
| 316 GrContext::kFlushWrites_PixelOp); | 317 GrContext::kFlushWrites_PixelOp); |
| 317 } | 318 } |
| 318 } | 319 } |
| 319 #endif | 320 #endif |
| 320 | 321 |
| 321 win->present(); | 322 win->present(); |
| 322 } | 323 } |
| 323 | 324 |
| (...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2329 #ifdef SK_BUILD_FOR_MAC | 2330 #ifdef SK_BUILD_FOR_MAC |
| 2330 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2331 setenv("ANDROID_ROOT", "/android/device/data", 0); |
| 2331 #endif | 2332 #endif |
| 2332 SkGraphics::Init(); | 2333 SkGraphics::Init(); |
| 2333 SkEvent::Init(); | 2334 SkEvent::Init(); |
| 2334 } | 2335 } |
| 2335 | 2336 |
| 2336 void application_term() { | 2337 void application_term() { |
| 2337 SkEvent::Term(); | 2338 SkEvent::Term(); |
| 2338 } | 2339 } |
| OLD | NEW |