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

Side by Side Diff: include/gpu/GrContext.h

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine 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
« no previous file with comments | « include/effects/SkPerlinNoiseShader.h ('k') | include/gpu/GrDrawContext.h » ('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 #ifndef GrContext_DEFINED 8 #ifndef GrContext_DEFINED
9 #define GrContext_DEFINED 9 #define GrContext_DEFINED
10 10
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 * @param width width of rectangle to write in pixels. 255 * @param width width of rectangle to write in pixels.
256 * @param height height of rectangle to write in pixels. 256 * @param height height of rectangle to write in pixels.
257 * @param config the pixel config of the source buffer 257 * @param config the pixel config of the source buffer
258 * @param buffer memory to read pixels from 258 * @param buffer memory to read pixels from
259 * @param rowBytes number of bytes between consecutive rows. Zero 259 * @param rowBytes number of bytes between consecutive rows. Zero
260 * means rows are tightly packed. 260 * means rows are tightly packed.
261 * @param pixelOpsFlags see PixelOpsFlags enum above. 261 * @param pixelOpsFlags see PixelOpsFlags enum above.
262 * @return true if the write succeeded, false if not. The write can fail bec ause of an 262 * @return true if the write succeeded, false if not. The write can fail bec ause of an
263 * unsupported combination of surface and src configs. 263 * unsupported combination of surface and src configs.
264 */ 264 */
265 bool writeSurfacePixels(GrSurface* surface, 265 bool writeSurfacePixels(GrDrawContext* surfaceDC, GrSurface* surface,
266 int left, int top, int width, int height, 266 int left, int top, int width, int height,
267 GrPixelConfig config, const void* buffer, 267 GrPixelConfig config, const void* buffer,
268 size_t rowBytes, 268 size_t rowBytes,
269 uint32_t pixelOpsFlags = 0); 269 uint32_t pixelOpsFlags = 0);
270 270
271 /** 271 /**
272 * Copies a rectangle of texels from src to dst. 272 * Copies a rectangle of texels from src to dst.
273 * bounds. 273 * bounds.
274 * @param dst the surface to copy to. 274 * @param dst the surface to copy to.
275 * @param src the surface to copy from. 275 * @param src the surface to copy from.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 void initMockContext(); 408 void initMockContext();
409 void initCommon(); 409 void initCommon();
410 410
411 /** 411 /**
412 * These functions create premul <-> unpremul effects if it is possible to g enerate a pair 412 * These functions create premul <-> unpremul effects if it is possible to g enerate a pair
413 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O therwise, they 413 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O therwise, they
414 * return NULL. 414 * return NULL.
415 */ 415 */
416 const GrFragmentProcessor* createPMToUPMEffect(GrTexture*, bool swapRAndB, 416 const GrFragmentProcessor* createPMToUPMEffect(GrTexture*, bool swapRAndB,
417 const SkMatrix&) const; 417 const SkMatrix&, GrRenderTarg et* dst) const;
418 const GrFragmentProcessor* createUPMToPMEffect(GrTexture*, bool swapRAndB, 418 const GrFragmentProcessor* createUPMToPMEffect(GrTexture*, bool swapRAndB,
419 const SkMatrix&) const; 419 const SkMatrix&, GrRenderTarg et* dst) const;
420 /** Called before either of the above two functions to determine the appropr iate fragment 420 /** Called before either of the above two functions to determine the appropr iate fragment
421 processors for conversions. This must be called by readSurfacePixels bef ore a mutex is 421 processors for conversions. This must be called by readSurfacePixels bef ore a mutex is
422 taken, since testingvPM conversions itself will call readSurfacePixels * / 422 taken, since testingvPM conversions itself will call readSurfacePixels * /
423 void testPMConversionsIfNecessary(uint32_t flags); 423 void testPMConversionsIfNecessary(uint32_t flags);
424 /** Returns true if we've already determined that createPMtoUPMEffect and cr eateUPMToPMEffect 424 /** Returns true if we've already determined that createPMtoUPMEffect and cr eateUPMToPMEffect
425 will fail. In such cases fall back to SW conversion. */ 425 will fail. In such cases fall back to SW conversion. */
426 bool didFailPMUPMConversionTest() const; 426 bool didFailPMUPMConversionTest() const;
427 427
428 /** 428 /**
429 * This callback allows the resource cache to callback into the GrContext 429 * This callback allows the resource cache to callback into the GrContext
430 * when the cache is still over budget after a purge. 430 * when the cache is still over budget after a purge.
431 */ 431 */
432 static void OverBudgetCB(void* data); 432 static void OverBudgetCB(void* data);
433 433
434 /** 434 /**
435 * A callback similar to the above for use by the TextBlobCache 435 * A callback similar to the above for use by the TextBlobCache
436 * TODO move textblob draw calls below context so we can use the call above. 436 * TODO move textblob draw calls below context so we can use the call above.
437 */ 437 */
438 static void TextBlobCacheOverBudgetCB(void* data); 438 static void TextBlobCacheOverBudgetCB(void* data);
439 439
440 typedef SkRefCnt INHERITED; 440 typedef SkRefCnt INHERITED;
441 }; 441 };
442 442
443 #endif 443 #endif
OLDNEW
« no previous file with comments | « include/effects/SkPerlinNoiseShader.h ('k') | include/gpu/GrDrawContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698