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

Side by Side Diff: platform_tools/android/apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp

Issue 1919993002: Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel buffer on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Skia 2 * Copyright 2011 Skia
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 #include "com_skia_SkiaSampleRenderer.h" 7 #include "com_skia_SkiaSampleRenderer.h"
8 8
9 #include "SampleApp.h" 9 #include "SampleApp.h"
10 #include "SkApplication.h" 10 #include "SkApplication.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 /////////////////////////////////////////// 54 ///////////////////////////////////////////
55 ///////////// SkOSWindow impl ///////////// 55 ///////////// SkOSWindow impl /////////////
56 /////////////////////////////////////////// 56 ///////////////////////////////////////////
57 57
58 SkOSWindow::SkOSWindow(void*) : fDestroyRequested(false) { 58 SkOSWindow::SkOSWindow(void*) : fDestroyRequested(false) {
59 } 59 }
60 60
61 SkOSWindow::~SkOSWindow() { 61 SkOSWindow::~SkOSWindow() {
62 } 62 }
63 63
64 bool SkOSWindow::attach(SkBackEndTypes /* attachType */, int /*msaaSampleCount*/ , AttachmentInfo* info) 64 bool SkOSWindow::attach(SkBackEndTypes /* attachType */, int /*msaaSampleCount*/ ,
65 bool /*deepColor*/, AttachmentInfo* info)
65 { 66 {
66 JNIEnv* env = gActivityGlue.m_env; 67 JNIEnv* env = gActivityGlue.m_env;
67 if (!env || !gWindowGlue.m_getMSAASampleCount || !gWindowGlue.m_obj) { 68 if (!env || !gWindowGlue.m_getMSAASampleCount || !gWindowGlue.m_obj) {
68 return false; 69 return false;
69 } 70 }
70 if (env->IsSameObject(gWindowGlue.m_obj, nullptr)) { 71 if (env->IsSameObject(gWindowGlue.m_obj, nullptr)) {
71 SkDebugf("ERROR: The JNI WeakRef to the Window is invalid"); 72 SkDebugf("ERROR: The JNI WeakRef to the Window is invalid");
72 return false; 73 return false;
73 } 74 }
74 info->fSampleCount = env->CallIntMethod(gWindowGlue.m_obj, gWindowGlue.m_get MSAASampleCount); 75 info->fSampleCount = env->CallIntMethod(gWindowGlue.m_obj, gWindowGlue.m_get MSAASampleCount);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 JNIEnv* env, jobject thiz) 347 JNIEnv* env, jobject thiz)
347 { 348 {
348 gWindow->saveToPdf(); 349 gWindow->saveToPdf();
349 } 350 }
350 351
351 JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_postInval( 352 JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_postInval(
352 JNIEnv* env, jobject thiz) 353 JNIEnv* env, jobject thiz)
353 { 354 {
354 gWindow->postInvalDelay(); 355 gWindow->postInvalDelay();
355 } 356 }
OLDNEW
« no previous file with comments | « include/views/SkWindow.h ('k') | platform_tools/android/apps/visualbench/src/main/jni/SkOSWindow_AndroidNative.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698