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

Side by Side Diff: src/gpu/SkGr.cpp

Issue 929243004: adding preabandon flag to DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback incorporated Created 5 years, 10 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 | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/effects/GrTextureStripAtlas.cpp » ('j') | 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 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 "SkGr.h" 8 #include "SkGr.h"
9 9
10 #include "GrXferProcessor.h" 10 #include "GrXferProcessor.h"
11 #include "SkColorFilter.h" 11 #include "SkColorFilter.h"
12 #include "SkConfig8888.h" 12 #include "SkConfig8888.h"
13 #include "SkData.h" 13 #include "SkData.h"
14 #include "SkErrorInternals.h"
14 #include "SkMessageBus.h" 15 #include "SkMessageBus.h"
15 #include "SkPixelRef.h" 16 #include "SkPixelRef.h"
16 #include "SkResourceCache.h" 17 #include "SkResourceCache.h"
17 #include "SkTextureCompressor.h" 18 #include "SkTextureCompressor.h"
18 #include "SkYUVPlanesCache.h" 19 #include "SkYUVPlanesCache.h"
19 #include "effects/GrDitherEffect.h" 20 #include "effects/GrDitherEffect.h"
20 #include "effects/GrPorterDuffXferProcessor.h" 21 #include "effects/GrPorterDuffXferProcessor.h"
21 #include "effects/GrYUVtoRGBEffect.h" 22 #include "effects/GrYUVtoRGBEffect.h"
22 23
23 #ifndef SK_IGNORE_ETC1_SUPPORT 24 #ifndef SK_IGNORE_ETC1_SUPPORT
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 if (result) { 554 if (result) {
554 return result; 555 return result;
555 } 556 }
556 } 557 }
557 558
558 result = create_bitmap_texture(ctx, bitmap, stretch, key, resizedKey); 559 result = create_bitmap_texture(ctx, bitmap, stretch, key, resizedKey);
559 if (result) { 560 if (result) {
560 return result; 561 return result;
561 } 562 }
562 563
563 SkDebugf("---- failed to create texture for cache [%d %d]\n", 564 SkErrorInternals::SetError( kInternalError_SkError,
564 bitmap.width(), bitmap.height()); 565 "---- failed to create texture for cache [%d %d] \n",
566 bitmap.width(), bitmap.height());
565 567
566 return NULL; 568 return NULL;
567 } 569 }
568 /////////////////////////////////////////////////////////////////////////////// 570 ///////////////////////////////////////////////////////////////////////////////
569 571
570 // alphatype is ignore for now, but if GrPixelConfig is expanded to encompass 572 // alphatype is ignore for now, but if GrPixelConfig is expanded to encompass
571 // alpha info, that will be considered. 573 // alpha info, that will be considered.
572 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType ct, SkAlphaType, SkColorProf ileType pt) { 574 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType ct, SkAlphaType, SkColorProf ileType pt) {
573 switch (ct) { 575 switch (ct) {
574 case kUnknown_SkColorType: 576 case kUnknown_SkColorType:
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 if (shader->asFragmentProcessor(context, skPaint, viewM, NULL, &paintCol or, &fp) && fp) { 713 if (shader->asFragmentProcessor(context, skPaint, viewM, NULL, &paintCol or, &fp) && fp) {
712 grPaint->addColorProcessor(fp)->unref(); 714 grPaint->addColorProcessor(fp)->unref();
713 constantColor = false; 715 constantColor = false;
714 } 716 }
715 } 717 }
716 718
717 // The grcolor is automatically set when calling asFragmentProcessor. 719 // The grcolor is automatically set when calling asFragmentProcessor.
718 // If the shader can be seen as an effect it returns true and adds its effec t to the grpaint. 720 // If the shader can be seen as an effect it returns true and adds its effec t to the grpaint.
719 SkPaint2GrPaintNoShader(context, rt, skPaint, paintColor, constantColor, grP aint); 721 SkPaint2GrPaintNoShader(context, rt, skPaint, paintColor, constantColor, grP aint);
720 } 722 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/effects/GrTextureStripAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698