| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "Viewer.h" | 8 #include "Viewer.h" |
| 9 | 9 |
| 10 #include "GMSlide.h" | 10 #include "GMSlide.h" |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 canvas->clipRect(contentRect); | 368 canvas->clipRect(contentRect); |
| 369 canvas->translate(contentRect.fLeft, contentRect.fTop); | 369 canvas->translate(contentRect.fLeft, contentRect.fTop); |
| 370 } | 370 } |
| 371 | 371 |
| 372 canvas->clear(SK_ColorWHITE); | 372 canvas->clear(SK_ColorWHITE); |
| 373 canvas->concat(fDefaultMatrix); | 373 canvas->concat(fDefaultMatrix); |
| 374 canvas->concat(computeMatrix()); | 374 canvas->concat(computeMatrix()); |
| 375 | 375 |
| 376 if (inSplitScreen) { | 376 if (inSplitScreen) { |
| 377 sk_sp<SkSurface> offscreenSurface = fWindow->getOffscreenSurface(true); | 377 sk_sp<SkSurface> offscreenSurface = fWindow->getOffscreenSurface(true); |
| 378 offscreenSurface->getCanvas()->getMetaData().setBool(kImageColorXformMet
aData, true); |
| 378 fSlides[fCurrentSlide]->draw(offscreenSurface->getCanvas()); | 379 fSlides[fCurrentSlide]->draw(offscreenSurface->getCanvas()); |
| 379 sk_sp<SkImage> snapshot = offscreenSurface->makeImageSnapshot(); | 380 sk_sp<SkImage> snapshot = offscreenSurface->makeImageSnapshot(); |
| 380 canvas->drawImage(snapshot, 0, 0); | 381 canvas->drawImage(snapshot, 0, 0); |
| 381 } else { | 382 } else { |
| 382 fSlides[fCurrentSlide]->draw(canvas); | 383 fSlides[fCurrentSlide]->draw(canvas); |
| 383 } | 384 } |
| 384 | 385 |
| 385 canvas->restoreToCount(count); | 386 canvas->restoreToCount(count); |
| 386 | 387 |
| 387 if (inSplitScreen) { | 388 if (inSplitScreen) { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 bool newSplitScreen = stateValue.equals(kON); | 590 bool newSplitScreen = stateValue.equals(kON); |
| 590 if (newSplitScreen != fSplitScreen) { | 591 if (newSplitScreen != fSplitScreen) { |
| 591 fSplitScreen = newSplitScreen; | 592 fSplitScreen = newSplitScreen; |
| 592 fWindow->inval(); | 593 fWindow->inval(); |
| 593 updateUIState(); | 594 updateUIState(); |
| 594 } | 595 } |
| 595 } else { | 596 } else { |
| 596 SkDebugf("Unknown stateName: %s", stateName.c_str()); | 597 SkDebugf("Unknown stateName: %s", stateName.c_str()); |
| 597 } | 598 } |
| 598 } | 599 } |
| OLD | NEW |