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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp

Issue 2712083002: color: Remove blink pre-conversion code (Closed)
Patch Set: Rebase Created 3 years, 9 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/AcceleratedStaticBitmapImage.h" 5 #include "platform/graphics/AcceleratedStaticBitmapImage.h"
6 6
7 #include "gpu/command_buffer/client/gles2_interface.h" 7 #include "gpu/command_buffer/client/gles2_interface.h"
8 #include "gpu/command_buffer/common/sync_token.h" 8 #include "gpu/command_buffer/common/sync_token.h"
9 #include "platform/graphics/MailboxTextureHolder.h" 9 #include "platform/graphics/MailboxTextureHolder.h"
10 #include "platform/graphics/SkiaTextureHolder.h" 10 #include "platform/graphics/SkiaTextureHolder.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return nullptr; 101 return nullptr;
102 createImageFromMailboxIfNeeded(); 102 createImageFromMailboxIfNeeded();
103 return m_textureHolder->skImage(); 103 return m_textureHolder->skImage();
104 } 104 }
105 105
106 void AcceleratedStaticBitmapImage::draw(PaintCanvas* canvas, 106 void AcceleratedStaticBitmapImage::draw(PaintCanvas* canvas,
107 const PaintFlags& flags, 107 const PaintFlags& flags,
108 const FloatRect& dstRect, 108 const FloatRect& dstRect,
109 const FloatRect& srcRect, 109 const FloatRect& srcRect,
110 RespectImageOrientationEnum, 110 RespectImageOrientationEnum,
111 ImageClampingMode imageClampingMode, 111 ImageClampingMode imageClampingMode) {
112 const ColorBehavior& colorBehavior) {
113 // TODO(ccameron): This function should not ignore |colorBehavior|. 112 // TODO(ccameron): This function should not ignore |colorBehavior|.
114 // https://crbug.com/672306 113 // https://crbug.com/672306
115 checkThread(); 114 checkThread();
116 if (!isValid()) 115 if (!isValid())
117 return; 116 return;
118 createImageFromMailboxIfNeeded(); 117 createImageFromMailboxIfNeeded();
119 sk_sp<SkImage> image = m_textureHolder->skImage(); 118 sk_sp<SkImage> image = m_textureHolder->skImage();
120 StaticBitmapImage::drawHelper(canvas, flags, dstRect, srcRect, 119 StaticBitmapImage::drawHelper(canvas, flags, dstRect, srcRect,
121 imageClampingMode, image); 120 imageClampingMode, image);
122 } 121 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 175
177 void AcceleratedStaticBitmapImage::checkThread() { 176 void AcceleratedStaticBitmapImage::checkThread() {
178 if (m_detachThreadAtNextCheck) { 177 if (m_detachThreadAtNextCheck) {
179 m_threadChecker.DetachFromThread(); 178 m_threadChecker.DetachFromThread();
180 m_detachThreadAtNextCheck = false; 179 m_detachThreadAtNextCheck = false;
181 } 180 }
182 CHECK(m_threadChecker.CalledOnValidThread()); 181 CHECK(m_threadChecker.CalledOnValidThread());
183 } 182 }
184 183
185 } // namespace blink 184 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698